Hello,
I need to addto the <body> tag for one of my EZ Pages. How can I go about changing the tag for just that page? Thanks in advance!Code:onload="initialize()"
Brian
Hello,
I need to addto the <body> tag for one of my EZ Pages. How can I go about changing the tag for just that page? Thanks in advance!Code:onload="initialize()"
Brian
Brian
http://2600strange.com
In the docs folder that comes bundled with Zen Cart when you download it is a file about javascript. There's an explanation in there as to how to load javascript, or as you're asking, run it when the page loads.
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
Kuroi,
I think I've found the file you're talking about (read_me_jscript.html), but I still can't figure out how to alter the <body> tag because it seems to be only referring to working with javascript. Can you point me in the right direction? Thanks for the help.
Brian
Brian
http://2600strange.com
Sorry, my bad. I should have directed you to the file that describes specifically how to add to the body onload attribute. That files in the same place as the one you found but called read_me_onload.html.
The idea that you should let go of, is that you add to the onload tag. That file will show you where and how to tell Zen Cart what you want added, and then Zen Cart will automatically do the adding for you on a page or site-wide basis depending upon which set of instructions you followed.
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
All right, perfect. Now I understand how to make it happen. Thanks for the help!
Now, my final question: what is the correct format for naming EZ pages folders in the modules/pages directory? The page I'd like to add to is ez page ID #13. I've tried naming the folder page_13 and that doesn't work. I'm assuming that I must have the wrong format for the folder names.
Thanks for your help thus far!
Brian
Brian
http://2600strange.com
I'm sorry but the question doesn't make sense to me. EZ-Pages are stored as block of HTML in the database, i.e. they don't have folders.
Might you be confusing them with define pages, which are "real" pages built using PHP?
Or are you using EZ-Pages to create links to something that would reside in a folder?
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
You can't target it to just one EZ-page specifically without writing custom code to accomplish that.
What exactly does this "initialize()" function call actually "do"? (Ya, I know it runs the "initialize()" function, which would logically start up some sort of javascript you've got on the page: what exactly is THAT doing? and why? )
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
It starts up my google maps javascript. Is there a way to just insert the javascript into the ezpage instead of loading in the body tag? Here's what I actually want to put in: onunload="GUnload()"
Brian
http://2600strange.com
So you're saying you don't really want an "onload" event at all?
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Nope, sorry about that, I really want an "onunload" event. I know very little about javascript, so I apologize for my ignorance of the difference. Is there a way to put that into the body of the ez page?
Brian
http://2600strange.com