trogette Posted April 10, 2007 Posted April 10, 2007 Can anyone walk me through adding javascript to a function? I want to be able to add the pop-up image javascript stuff to an infobox-contents array, and I figured it might streamline things if the pop-up image code was written as a function anyway. Does that make sense? Is it even possible? I have a vague idea that what I need to do is set the javascript bits as php variables and then put the bits together but since the javascript is already littered with php I'm having trouble seeing what I need to put where! Thanks all :) Will upload the results to contributions ASAP!
vasttech Posted April 10, 2007 Posted April 10, 2007 You can use the echo command in PHP to write the javascript to the page. Take a look at form_check.js.php in the includes directory. In there you will see the code for the gender checking and how it writes that code only if genders are enabled. You could create a function to do the same thing in a box if wanted. osCommerce Knowledge Base osCommerce Documentation Contributions
trogette Posted April 10, 2007 Author Posted April 10, 2007 Thanks, I'll have a look :) It's just that the pop-up thing has so many special characters I'm not sure how to break it up!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.