The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Question about multi-level drop down menu, simple HTML multi-level drop down menu
ilovejdmtoy
post Feb 10 2014, 03:25 PM
Post #1





Group: Members
Posts: 3
Joined: 10-February 14
Member No.: 20,341



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 +
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Feb 10 2014, 04:39 PM
Post #2


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



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?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
ilovejdmtoy
post Feb 10 2014, 04:47 PM
Post #3





Group: Members
Posts: 3
Joined: 10-February 14
Member No.: 20,341



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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 10 2014, 05:27 PM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



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?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
ilovejdmtoy
post Feb 10 2014, 06:18 PM
Post #5





Group: Members
Posts: 3
Joined: 10-February 14
Member No.: 20,341



I am a newbie for the html, can you show me an example what I can accomplish this search using two dropdown menu please
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Feb 10 2014, 08:20 PM
Post #6


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



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.)
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 24th April 2024 - 09:08 PM