473,386 Members | 1,712 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,386 software developers and data experts.

Help with forms.

I was wondering how I could create a form field where the viewer would
be redirected to another webpage depending on the input.

Ex: user types "Jan0106" in the form field

and would get redirected to
http://www.test.com/jan0106.htm

Thanks

Jan 30 '06 #1
1 1112
islanderjo wrote:
I was wondering how I could create a form field where the viewer would
be redirected to another webpage depending on the input.

Ex: user types "Jan0106" in the form field

and would get redirected to
http://www.test.com/jan0106.htm


You generally shouldn't require the user to enter such bizarre date
formats into a form, you should make it a little more user friendly by
either providing 3 separate fields for day, month and year (as long as
you make it clear which field is which) or using something sensible like
ISO-8601 (e.g. 2006-01-30).

As for redirecting the user, that's a server side issue that can be
easily handled by your form processing script (e.g. PHP, ASP, JSP, Perl,
Python or whatever you like).

for example:

Markup: (minimal example only, some markup omitted for brevity)

<form method="get" action="/article">
<p>Year (4 digits): <input type="text" name="year">
<p>Month:
<select name="month">
<option>January</option>
...
</select>
<p>Day (1-2 digits): <input type="text" name="day">
</form>

When submitted, the server side script will receive values for the year,
month and day, which can then be used to construct the correct file
name, check if one exists for that date and if it does send a 303 See
Other HTTP response with a location header field to redirect the user.

Writing the server side script is off-topic for this newsgroup.

--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox
Jan 30 '06 #2

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

Similar topics

1
by: //\\//\\RLe | last post by:
I'm searching for some template samples for Oracle Forms (Oracle Designer 6i ver. 4.8/Forms 6) with stuff like: on-click data sort in multi column, current record color change, form status...
3
by: JIMMIE WHITAKER | last post by:
The below stored procedure works. However, I am trying to use a text box from a temp form for the where clause. WHERE Transactions.TransactionID = !! I even tried changing first line: Alter...
2
by: Sudheer Kareem | last post by:
Dear All Please tell me how to assosiate help files with my Vb.net Project. Regards Sudheer
0
by: Jurjen de Groot | last post by:
I have build an ASP.NET application and would like to protect various folders containing aspnet pages for various usertypes. /Admin /Manager /User I've created a login on the default.aspx in...
15
by: Joshua Kendall | last post by:
I have a script in which it keeps opening the same form instead of only one instance. I also need help with a form that has a password. Where do I put the actual password? can I use a database for...
1
by: Michael D. Reed | last post by:
I am using the help class to display a simple help file. I generated the help file using Word and saving it as a single page Web page (.mht extension). I show the help file with the following...
8
by: jen | last post by:
i'm trying to decide what format to use when it comes to building user help and tips. ..chm files, tooltips, custom forms, other...? is there a tool that "easily" lets you build help files...
4
by: mcelary | last post by:
When the user clicks a radio button it creates a postback where I add a button control dynamically. My problem is I cannot get the dynamically added button to work with on an click event. The button...
21
by: Dan Tallent | last post by:
In my application I have a form (Customer) that I want to be able to open multiple copies at once. Within this form I have other forms that can be opened. Example: ZipCode. When the user enters...
1
by: Dansmith122 | last post by:
Hi I have been working on the java script for my website and I need help with the out put variables. I need to know how to add more variable for each row in my survey. I am very lost ...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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.