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


Fotiman - 9:22 pm on Mar 19, 2010 (gmt 0)


Oh. I just noticed 1 thing with your URL. You didn't put two trailing ' before the final ;. 1 for the 'http statement and 1 for the ' + categories.value statement. Is that intentional? Or should it be written "'http.....;"?

That was intentional. Here's what it looks like if I split each concatenation up into multiple lines. It might make it easier to understand what's happening:


location = 'http://www.example.com/yourSearchPage.php?r=' +
regions.value +
'&c=' +
categories.value;

Line 1 contains a string, line 2 contains a variable so it's not wrapped in quotes, line 3 is a string, line 4 ends with another variable so no quotes needed.


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