Page 1 of 1

Adding Menu on WordPress.org site

PostPosted: Sat Sep 04, 2010 3:08 pm
by trebor11584
Hi,

Hope anyone here could help me with my problem, I'm currently developing a site via Wordpress and I was able to load the button images properly but the thing is the Javascript isn't working. I did some research and found out that aside from callling the Javascript file on your head section you also need to put this code somewhere the PHP file you want to use the javascript to.

Code: Select all
<script type="text/javascript">
<!--
updatepage();
//--></script>


Now, my problem is when I checked the JS file it contain lots of function. What function on the Javascript file do I need to call to make buttons work?

Please help me.

TIA.

Re: Adding Menu on WordPress.org site

PostPosted: Mon Sep 06, 2010 5:24 am
by Gatis
Hi,

Now, my problem is when I checked the JS file it contain lots of function. What function on the Javascript file do I need to call to make buttons work?

All functions of the JS file generated by Easy Button & Menu Maker are important.
you also need to put this code somewhere the PHP file you want to use the javascript to.

I am afraid I did not understand this part. Can you give me the URL where this is said?

Re: Adding Menu on WordPress.org site

PostPosted: Mon Sep 06, 2010 11:45 am
by trebor11584
Gatis wrote:Hi,

Now, my problem is when I checked the JS file it contain lots of function. What function on the Javascript file do I need to call to make buttons work?

All functions of the JS file generated by Easy Button & Menu Maker are important.
you also need to put this code somewhere the PHP file you want to use the javascript to.

I am afraid I did not understand this part. Can you give me the URL where this is said?



Hi Gatis,

Thanks for the response, really appreciate it.

Here are the links that I followed.

http://lorelle.wordpress.com/2005/09/16/using-javascript-in-wordpress/

http://codex.wordpress.org/Using_Javascript

Both guides show only one function call (since this is just a sample). Since you've mentioned that all the functions on the JS file are important does that mean I need to include all of it?