Help - Search - Members - Calendar
Full Version: Question about multi-level drop down menu
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
ilovejdmtoy
Hello, I have searched on Google for about a hour and can't find out how to work this around, so I am here for some help. Thanks in advance!

Please take a look at my code:

CODE
<form method="get" id="searchform" action="http://store.ijdmtoy.com/-s/146.htm">


<INPUT TYPE=HIDDEN NAME="searching" VALUE="Y">


<p><select size="1" name="Search">
<option>2014</option>
<option>2013</option>
<option>2012</option>
<option>2011</option>
<option>2010</option>
<option>2009</option>
<option>2008</option>
<option>2007</option>
<option>2006</option>
<option>2005</option>
<option>2004</option>
<option>2003</option>
<option>2002</option>
<option>2001</option>
<option>2000</option>
</select>


<select size="1" name=" ">
<option>TSX</option>
<option>MDX</option>
<option>RDX</option>
<option>RSX</option>
<option>NSX</option>
<option>ZDX</option>
</select>

<input type="submit" value="Search" name=""></p>
</form>


For example if I choose 2012 and TSX, it will return as http://store.ijdmtoy.com/Acura-LED-Interior-Light-Bundle-Deal-s/146.htm?searching=Y&Search=2012&+=TSX

How do I change the coding so it can return http://store.ijdmtoy.com/Acura-LED-Interior-Light-Bundle-Deal-s/146.htm?searching=Y&Search=2012+TSX without the & and = around the +
Christian J
QUOTE(ilovejdmtoy @ Feb 10 2014, 09:25 PM) *

?searching=Y&Search=2012&+=TSX

That's how querystrings from forms work (sending name/value pairs).

CODE
<select size="1" name=" ">

The second SELECT menu needs a NAME value, not just white space.

CODE
How do I change the coding so it can return [b]http://store.ijdmtoy.com/Acura-LED-Interior-Light-Bundle-Deal-s/146.htm?searching=Y&Search=2012+TSX[/b] without the [color=#CC0000]& and = around the +[/color]

With HTML alone you can't, unless perhaps if you use a single SELECT menu with OPTION values like "2012 TSX". Otherwise you might do it with client-side javascript, or (better) by redirecting the first URL with some kind of server-side script like PHP.

What's the problem with the & and = characters? Can't you edit the form handling server-side script?
ilovejdmtoy
Christian, thanks for your reply.

I can't edit from the Volusion hosting server-side script.

Is there anyway I can use simple HTML to accomplish this:

The website search URL is http://store.ijdmtoy.com/-s/146.htm?searching=Y&Search=

All I need from these two drop down menu is the year and the model to be (2000 and CL in this example below)

http://store.ijdmtoy.com/-s/146.htm?search...;Search=2000+CL
pandy
Why do you want the querystring in that form to begin with? Why can't you use what you get, or rather would get with a proper name for the second select?
ilovejdmtoy
I am a newbie for the html, can you show me an example what I can accomplish this search using two dropdown menu please
Christian J
QUOTE(ilovejdmtoy @ Feb 10 2014, 10:47 PM) *

Is there anyway I can use simple HTML to accomplish this:

No. You might use a single SELECT menu with values like these:

CODE
<form>
    <select size="1" name="Search">
    <option>2000 TSX</option>
    <option>2000 MDX</option>
    ....
    <option>2014 TSX</option>
    <option>2014 MDX</option>
    </select>
    <input type="submit" value="Send">
</form>

but such a menu will obviously become rather long.

If you must use two SELECT menus you need to manipulate the URL querystring with a script to get rid of the unwanted parts. Can you run e.g. PHP on your own web page? (Javascript can also be used as a last resort, but users without javascript will not be able to use the form.)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.