Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- Looking for mutiple level pulldown menu with a twist


stu2 - 11:31 pm on Mar 17, 2010 (gmt 0)


OK. I just read this. I think I've got what I need r=' + regions.value +' c=' + categories.value'

In this case for my two examples would return

Region 1 + Category 1 = r='1'&c='1'
Province 3 + Category 3 = p='3'&c='3'

Correct? Yes/No?

Of course I need to replace r/p/c with whatever my software uses for those parameters.

This is a much better solution than all the others I've tried. I just need 2 lines of code (1 for Regions & 1 for Provinces).

Can I ask, why are the "+" necessary? Why not write r='regions.value'&c='categories.value'?

Is that really ' + regions.value +' and only ' + categories.value' (no trailing plus)?

Is case important in the syntax? For example. If I define my regions as "Regions" does it then need to be "Regions.value"?

And finally, I replace "alert('province search')" with what in order for it to execute the url directly?


Thread source:: http://www.webmasterworld.com/javascript/4097032.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com