School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 306,833 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,757 people online right now. Registration is fast and FREE... Join Now!




Drop Down Menu Without Javascript

 

Drop Down Menu Without Javascript

axeldrummer

1 Dec, 2004 - 12:20 AM
Post #1

New D.I.C Head
*

Joined: 21 Sep, 2004
Posts: 17

I was wondering is there a way to implement the <select> <option value ="some_link">Link title</option><option....... </select> where the user can select one in the menu and then click a submit button to head to the link without javascript?

My main concern is that users don't have javascript turned on.

Thanks, Jay

User is offlineProfile CardPM
+Quote Post


skyhawk133

RE: Drop Down Menu Without Javascript

1 Dec, 2004 - 10:04 AM
Post #2

Head DIC Head
Group Icon

Joined: 17 Mar, 2001
Posts: 16,882



Thanked: 156 times
Dream Kudos: 1650
Expert In: Web Development

My Contributions
Sure, pass the form to a page that uses a redirect to whatever the value of the link was. For example, create a form with the drop down menu and the URL's as the values. Then when the form is submitted it should pass to a page with:
CODE

<?php

Header("Location: http://$select_url");

?>


In the above code, it's assuming you named your select drop down select_url. This will simply redirect the user based on a dynamic input, should solve the issue you are having.
User is online!Profile CardPM
+Quote Post

axeldrummer

RE: Drop Down Menu Without Javascript

2 Dec, 2004 - 01:40 AM
Post #3

New D.I.C Head
*

Joined: 21 Sep, 2004
Posts: 17

skyhawk133-

Thanks for your advice.

Is there a way to create dynamically generating sub lists without javascript? For example, when I highlight one item on the first list, another dropdown menu below it changes with a list of sub categories based on the selection out of the first list.

If there's a way you know, that's would be fantastic! Since some users turn off javascript is my main reason for doing this.

Thanks, Jay
User is offlineProfile CardPM
+Quote Post

skyhawk133

RE: Drop Down Menu Without Javascript

2 Dec, 2004 - 11:33 AM
Post #4

Head DIC Head
Group Icon

Joined: 17 Mar, 2001
Posts: 16,882



Thanked: 156 times
Dream Kudos: 1650
Expert In: Web Development

My Contributions
They would have to click a Next button or something in order to load in a new page to populate the drop down menu, normally I use onChange(this.submit) but since you don't want to use javascript, you would need to provide a next button and then look to see if they had selected a value and generate another drop down menu based on the prior selection.
User is online!Profile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/20/09 10:59PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month