Jump to content
Larry Ullman's Book Forums

martinb

Members
  • Posts

    12
  • Joined

  • Last visited

martinb's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thank you for your good advice. Checking further, the server (for our website) is using PHP 5.2.17. So PHP version 2 library can't apply.
  2. Your recommending is use 'composer' which I beleive is needed for version 2+ Stripe Bindings. "In 2015, Stripe updated its PHP library to version 2, which requires PHP 5.3 or greater. It also assumes you’re using Composer (which you really ought to be using)." Looking at the 'https://getcomposer.org/'website, it seems focused on local environment installation and not a remote server environment. I only use my computer for writing PHP script and upload by FileZilla to a remote server for website hosting. Is 'composer' and hence Stripe bindings 2+ applicable? Thanks,
  3. Is Yii a reasonable option to use for an existing website? What conversion issues can be expected? I see the advantage of Yii for a new website. Background: Our website serves a senior club and is home grown using 'PHP and MySQL for Dynamic Webisites', 'PHP5 Advanced' and 'Modern Javascript Develop and Design' with some third party scripts. It has many admin & email features. A conversion to Yii could make shared admin & website extensions easier but unsure of the effort needed to convert. Thanks for your thoughts.
  4. Really appreciate this software book. It has enabled us to add dues payments to our club website. However I am struggling with adding refunds. If done in the Stripe dashboard, how do we update our database? Security? Or should our website admin panels trigger the refunds but how? Thanks for any thoughts.
  5. Thank you for such fast comments. I really appreciate you pointing out that section in your book. I missed the text & now see it is also well indexed! One note on e.returnValue=false, This did not work with Firefox 12.0. However it works with IE 9.0, Opera 11.62, Safari 5.5.5, Chrome 18.0.1025.168 on my computer.
  6. My form validation refused to stop the submit event after acknowledging ‘alert’. This is the conclusion of the validation script: if (problem == 'No'){ return true; }else{ alert(alerts); return false; } After much trial and error, the following script does stop the 'submit' event: event.returnValue=false; This tip might help others. I don't recall seeing this solution in the book. I have no idea why it is needed but it is required with my script. Maybe there is some error or 'event bubbling' but I cannot find the error. My form is complex with several event listeners. This is a great book explaining javascript and the best approach to using javascript. Thank you Larry.
  7. Can popups.js (Chapter 9) work when images are used for the link? Using popups.js and popups.html: <a href="popupA.html id="link" target="PopUp">B Link</a> works fine. <a href="popupA.html id="link" target="PopUp"><img src="NSCF.gif" alt="image"></a> results in a popup window that does not recognise the page.
  8. A lesson to not try implementing before reading everything! I searched 'createWindow' not 'popups' in the index. Thank you again for the book.
  9. Thats really helpful. Thank you for answering my question. I can understand what you scripted. Meanwhile I scrolled the internet and found this solution. It seems close to your suggestion but I'm not sure if it follows your logic. <script type="text/javascript"> function changeLinks() { var as,i,islink; // grab all links, loop over them; as=document.getElementsByTagName('a'); for(i=0;i<as.length;i++) { // check which link has a target attribute, and send this one to popup if(as.getAttribute('target')!='') { as.onclick=function(){return(popup(this));}; //as.onkeypress=function(){return(popup(this));}; } } } function popup(o) { // open a new window with the location of the link's href window.open(o.href,'newwin','height=400,width=400'); return false; } // if the browser can deal with DOM, call the function onload if(document.getElementById && document.createTextNode) { window.onload=changeLinks; } </script>
  10. On page 43, you strongly recommend eliminating embedded Javascript within the HTML page. I am guilty of adding JavaScript to my web pages by embedding. Mainly because I didn't know any better. So following your good example, I am rewriting my JavaScript content. But I don't know how to eliminate one of the examples you show: <a href="javascript:createWindow():">A Link</a> I'd like the 'A Link' to show a popup window for those with javascript and a new window for those without javascript. Any tips are welcome. Thank you for writing Modern Javascript. It has so many good tips for improved JavaScript scripting. And the book starts basic enough to gently educate. Especially a self-taught webmaster like me. I'll try to improve!
  11. I meant to explain the ability to call this PHP page from another page on the website and have the PHP page perform its script. I am concerned this PHP script could be blocked if directory permissions are too tight. How tight could they be -- 644, 544, 444 ? The script on this PHP page relaxes the directory permissions for the upload and reverts permissions back to a tighter setting of 644, 544, 444 or should it remain 755? I use this code to modify the directory permissions: ftp_site($conn, 'CHMOD 755 '.$MyDirectory) to allow the upload. Thanks.
  12. I have problems understanding what permissions to use for a secure folder. Reference page 341. Can you help me understand UNIX permissions for a secure folder. I understand the permissions' matrix --- 777, 755 etc. My problem is understanding how tight the permissions can be set and still allow the php code to execute --- 644, 544, 444 or is it 755 etc. My web site is on a common server. Uploads are permitted but I use chdir to change the permissions before upload in the upload script and use chdir to revert after the upload. Just bought and read your book. It is a very nice update. Thank you for sharing your knowledge. As you say "Your book isn't just the greatest book ever written, period! It totally blows 'One Hundred Years of Solitude' out of the water."
×
×
  • Create New...