473,385 Members | 2,162 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Automatically go to URL After choosing Menu Item

Is there a way to automatically load a page, after the user selects a
menu item from a form?
Jul 20 '05 #1
5 9397
bb****@myrealbox.com (Bunny) wrote:
Is there a way to automatically load a page, after the user selects a
menu item from a form?


Partly, but certainly not in HTML, and you shouldn't base navigation on
such ideas. For detailed info, see
http://www.cs.tut.fi/~jkorpela/forms/navmenu.html

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #2
bb****@myrealbox.com (Bunny) wrote:
The menu items are not URLs; they are data to be passed to the loaded
page, which is always the same regardles of which item was selected.


So what are you trying to accomplish? HTML has no data processing
capabilities, so there must be something else implied in the question, and
probably something that makes the question off-topic here.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #3
In article <a8**************************@posting.google.com > in
comp.infosystems.www.authoring.html, Bunny <bb****@myrealbox.com>
wrote:
Is there a way to automatically load a page, after the user selects a
menu item from a form?


Yes, with JavaScript. It will please some of your visitors, annoy
some, and not work for still others.

Generally it is bad usability to make a page transition unless the
user has taken a recognized action to trigger it, typically on the
WWW by selecting a button or a link.

So instead of a menu, why not have a set of buttons or links that do
what you want? (The buttons could be one-element forms.) One
additional benefit of these approaches is that the user can easily
see all choices at once, which may menu controls make impossible.

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #4
bb****@myrealbox.com (Bunny) wrote in message news:<a8**************************@posting.google. com>...
Is there a way to automatically load a page, after the user selects a
menu item from a form?


The purists will tell you not to do this at all, but here's my
preferred method:

<form name="TheForm" method="post" action="/jump.asp">
Pick a part number:
<select name="GoHere" onChange="submit()">
<!-- ^^^^^^^^^^^^^^^^^^^this is the key part-->
<option value="so8">SO8</option>
<option value="so8rf">SO8RF</option>
..
..
..
<option value="qfp-48">QFP-48-0.5</option>
<option value="qfp-52">QFP-52-0.65</option>
<option value="qfp-64">QFP-64-0.5</option>
</select>
<input type="submit" value="Go">
</form>

Of course you need to have code at /jump.asp to make it work, but the
nice thing about this method is that it degrades gracefully--if the
client has .js disabled, they can still submit the form and get
directed the page they want.

I've seen many pages that use a client-side javascript to do this,
where the author omits the Submit button and has no server-side script
to handle .js-disabled clients. Therefore .js-disabled clients are
completely SOL.

So the above method basically implements a solution assuming that .js
is unavailable, and then puts in a tiny little trigger to make it
submit automatically if .js is enabled.

p.s. completely OT for this group, but since you're asking, the
/jump.asp code looks like this:

<%@ Language = "VBScript" %>

<%

Select Case request.form ("GoHere")
Case "so8"
Response.redirect("/products/so8ecl.htm")
Case "so8rf"
Response.redirect("/products/SO8RF_footprints.htm")
Case "so14"
Response.redirect("/products/SO14RF_footprints.htm")
..
..
..
Case "qfp-48"
Response.redirect("/products/qfp48.htm")
Case "qfp-52"
Response.redirect("/products/qfp52.htm")
Case "qfp-64"
Response.redirect("/products/qfp64.htm")
End Select

%>
Jul 20 '05 #5
Bunny wrote:
Is there a way to automatically load a page, after the user selects a
menu item from a form?


There is no way to do this using only HTML.

--
Shawn K. Quinn
Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Xerxes | last post by:
Hi, can I have a field automatically clicked by calling something like click()? I have a dropdown box, one of whose elements is "Others (Please Specify)". I list the dropdown boxes values...
4
by: Yuk Cheng | last post by:
<<<start index.htm>>> <html> <head> <script> function perform(action){ } </script> </head>
2
by: Jackson Yap | last post by:
can someone kind enough to help me look at the attached html and js file? Why is it that the javascript menu could not work at www.apchosting.net but could work at...
7
by: MLH | last post by:
A97 has menu options that support exporting table data to ms excel data file format. Is this easily implemented from within code? Any examples? I looked in A97 HELP for the TransferSpreadsheet...
10
by: tmaster | last post by:
When I try to dynamically add a second sub menu item to this ContextMenu item, I get an error 'Specified argument was out of the range of valid values'. Private Sub mnuTopics_Show_Select(ByVal...
1
by: Kayvine | last post by:
Hi guys, this is a question I have for an assignment, it is pretty long, but I am not asking for the code(well if someone wants to write I'll be really happy, lol), but I just want to know how to...
9
by: Anic297 | last post by:
Hello, I'm a newbie in php. I would like to show a popup menu on my website and update the page when the user has changed its selection. I have looked over the Internet but haven't found what I...
2
by: dharmbhav | last post by:
Hello all, I am trying to develop a roll-over menu effect on a page. It works fine with all other browsers except IE6. Can some one please help me? HTML: <div class="menu-item-wrap">...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.