School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!
Welcome to Dream.In.Code
Become an Expert!

Join 340,029 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 4,089 people online right now. Registration is fast and FREE... Join Now!



Drop Down Menu Without Javascript

Drop Down Menu Without Javascript

#1 axeldrummer  Icon User is offline

  • New D.I.C Head
  • Pip
  • Group: Members
  • Posts: 17
  • Joined: 21-September 04


Dream Kudos: 0

Posted 01 December 2004 - 12:20 AM

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
Was This Post Helpful? 0
  • +
  • -


#2 skyhawk133  Icon User is offline

  • Head DIC Head
  • Icon
  • View blog
  • Group: Webmaster
  • Posts: 17,427
  • Joined: 17-March 01


Dream Kudos: 1650

Expert In: Web Development

Posted 01 December 2004 - 10:04 AM

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:
 
<?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.
Was This Post Helpful? 0
  • +
  • -

#3 axeldrummer  Icon User is offline

  • New D.I.C Head
  • Pip
  • Group: Members
  • Posts: 17
  • Joined: 21-September 04


Dream Kudos: 0

Posted 02 December 2004 - 01:40 AM

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
Was This Post Helpful? 0
  • +
  • -

#4 skyhawk133  Icon User is offline

  • Head DIC Head
  • Icon
  • View blog
  • Group: Webmaster
  • Posts: 17,427
  • Joined: 17-March 01


Dream Kudos: 1650

Expert In: Web Development

Posted 02 December 2004 - 11:33 AM

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.
Was This Post Helpful? 0
  • +
  • -



Fast Reply

  

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



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