954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

2 duplicate javascriptsscripts on 1 webpage?

Hi everyone,

I let a friend use a directory on my website for his art e-zine. He emailed me this morning because he's having trouble getting 2 forms with the same javascript to work on the same page.

I really don't know anything about javascript, though (neither does he), and we can't quite figure out how to make it work. He just copied/pasted the script from somewhere.

He has 2 drop-down lists on the page. One is a menu of paintings by a particular artist; the second is a menu of drawings by the same artist.

There is a script for each of the 2 forms, that makes it so when a menu item is selected, you are taken to that page in question immediately, without having to hit a "go" button or something of that nature.

It works fine when only one form is on the page, but when the second form is added, neither work.

If anyone can enlighten us, I'd be most appreciative.

The URL is http://www.emptymirrorbooks.com/thirdpage/pullMDSx.html

Thanks so much!!
cheers ~
Denise

nicekitty
Newbie Poster
3 posts since Jun 2006
Reputation Points: 10
Solved Threads: 0
 

Your problem is that you have two functions with the same name calling two forms with the same.


For the first form/script:

[html]





[/html]

For the second form/scrpt:

[html]





[/html]

note changes to the function names, object names , form names, and select names.

FC Jamison
Posting Pro in Training
Team Colleague
446 posts since Jun 2004
Reputation Points: 92
Solved Threads: 21
 

Ah!

nicekitty
Newbie Poster
3 posts since Jun 2006
Reputation Points: 10
Solved Threads: 0
 

Ah! Thanks so much. That makes so much sense. So simple, really.

Sure appreciate the help!

cheers ~
Denise

nicekitty
Newbie Poster
3 posts since Jun 2006
Reputation Points: 10
Solved Threads: 0
 

No Problem

FC Jamison
Posting Pro in Training
Team Colleague
446 posts since Jun 2004
Reputation Points: 92
Solved Threads: 21
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You