Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Help with JS Dropdown Code To Autopopulate
Old 03-31-2009, 04:11 PM Help with JS Dropdown Code To Autopopulate
Junior Talker

Posts: 3
Name: Beth
Trades: 0
Hello,

I need some help with this code. I have a dropdown menu that is a module in merchantadvisor. I can use coding in the module to create a dropdown menu which is uses asp to retrieve from the database. Currently it uses a go button. I want to get rid of that step for the user so when they make a selection from the dropdown menu it will populate the results without the go button. I hope that makes sense!

Here is the code that I'm working with. It's not working right and I don't see the problem.

This is the error:

document.form1.jumpmenu is null or not an object

I don't know what that means!

Any advice?

Thanks!!!



code:

<script language="javascript" type="text/javascript" >
<!-- hide
function jumpto(x){
if (document.form1.jumpmenu.value != "null") {
document.location.href = x
}
}
// end hide -->
</script>
<form action="deluxeSFshop.aspx" name="searchbox" id="searchbox">
<input type='hidden' name='sfid' value=87970 >
<select name="c" id="c" onChange="jumpto(document.form1.jumpmenu.options[document.form1.jumpmenu.options.selectedIndex].value)">
<option value="0" selected>pick boys theme</option>
<option value="156240">animals</option>
<option value="156248">backyardigans</option>
<option value="156249">blues clues</option>
<option value="156250">bob the builder</option>
<option value="156261">buzz lightyear</option>
<option value="156262">cars (disney)</option>
<option value="156251">cars-trucks-planes</option>
<option value="156257">cowboys</option>
<option value="156252">construction</option>
<option value="156259">curious george</option>
<option value="156242">dinos & monsters</option>
<option value="156260">DISNEY</option>
<option value="156284">dora & diego</option>
<option value="156290">elmo-sesame street</option>
<option value="156253">firetrucks</option>
<option value="156302">hot wheels</option>
<option value="156243">jungle animals</option>
<option value="156307">looney tunes</option>
<option value="156263">mickey mouse</option>
<option value="156254">motorcycles</option>
<option value="156264">nemo</option>
<option value="156308">nickelodeon</option>
<option value="156312">oceans & surfing</option>
<option value="156314">pirates of caribbean </option>
<option value="156315">scooby-doo</option>
<option value="156316">space & planets</option>
<option value="156321">spongebob</option>
<option value="156324">spiderman</option>
<option value="156325">superman</option>
<option value="156323">superhero-others</option>
<option value="156322">star wars</option>
<option value="156327">thomas train</option>
<option value="156256">tonka</option>
<option value="156328">transformers</option>
<option value="156326">wiggles</option>
<option value="156266">winnie the pooh</option>
<option value="156329">MORE THEMES</option>
</select>
</form>

Last edited by bhansel; 03-31-2009 at 05:08 PM.. Reason: more specific
bhansel is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-01-2009, 02:07 PM Re: Help with JS Dropdown Code To Autopopulate
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
This just means document.form1 doesn't refer to anything in existence. If you are trying to access the form I think you are, you should use document.getElementById("searchbox") instead.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Reply     « Reply to Help with JS Dropdown Code To Autopopulate
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.10606 seconds with 12 queries