473,732 Members | 2,083 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 9407
bb****@myrealbo x.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****@myrealbo x.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.infosystem s.www.authoring.html, Bunny <bb****@myrealb ox.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****@myrealbo x.com (Bunny) wrote in message news:<a8******* *************** ****@posting.go ogle.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="submi t()">
<!-- ^^^^^^^^^^^^^^^ ^^^^this is the key part-->
<option value="so8">SO8 </option>
<option value="so8rf">S O8RF</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.redire ct("/products/so8ecl.htm")
Case "so8rf"
Response.redire ct("/products/SO8RF_footprint s.htm")
Case "so14"
Response.redire ct("/products/SO14RF_footprin ts.htm")
..
..
..
Case "qfp-48"
Response.redire ct("/products/qfp48.htm")
Case "qfp-52"
Response.redire ct("/products/qfp52.htm")
Case "qfp-64"
Response.redire ct("/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
1709
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 alphabetically. Sometimes, this value happens to be on the top and SELECTED. The problem is that if this item is selected by clicking on it, in response to onChange I open a text field (so user can specify the value). If this field is automatically...
4
5778
by: Yuk Cheng | last post by:
<<<start index.htm>>> <html> <head> <script> function perform(action){ } </script> </head>
2
3892
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 http://home.pacific.net.sg/~jacksony ? (the drop down bar could not work at www.apchosting.net but can drop at home.pacific.net.sg. I suspect it is a server problem but was told it is not possible, therefore assuming it is a client script problem? the script works last time...
7
2919
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 Action but there was no example code (Example appeared at the top next to 'See Also' but it was grayed out).
10
21323
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 sender As System.Object, _ ByVal e As System.EventArgs) _ Handles mnuTopics_Show.Select Dim mShowMenuItem As MenuItem mShowMenuItem = DirectCast(sender, MenuItem)
1
2517
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 start it and what main topics in C I will need to cover in the assignment. Thanks a lot. CSC180 Assignment #3: Menu Madness Due Date: Thursday, November 8th at 1:00am Contents: · General Info · What to Hand In o Submission Instructions
9
1786
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 want (apparently, "Popup menu" is not the correct term, but it's the one I use in "desktop" programming). Can someone point me in the right direction?
2
4193
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"> <a href="#" class="menu-item-text"> Menu1 </a>
0
8944
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8773
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9445
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9234
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6733
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6030
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4548
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4805
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2177
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.