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

Fill a web document with web forms

I want to make a web with a form with some fields.
When the user submits they will generate a new web similar as this:

Mr. <Somebody>:
Your computer is <computer>
Jul 23 '05 #1
1 1311
Tadeo wrote:
I want to make a web with a form with some fields.
When the user submits they will generate a new web similar as this:

Mr. <Somebody>:
Your computer is <computer>


-- page1.html

<body>
<form name="myForm" method="GET" action="page2.html">
Your name: <input type="text" name="theName">
<br>
Your computer: <input type="text" name="theComputer">
<br>
<input type="submit" name="submitButton" value="Submit">
</form>
</body>

-- page2.html

<body>
<script type="text/javascript">
if (/theName=([^&]*)/.test(window.location.search) && RegExp.$1) {
document.write('Mr. ' + RegExp.$1 + '.<br>');
} else {
document.write('No name supplied!<br>');
}
if (/theComputer=([^&]*)/.test(window.location.search) && RegExp.$1) {
document.write('Your computer is ' + RegExp.$1 + '.<br>');
} else {
document.write('No computer supplied!<br>');
}
</script>
</body>

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #2

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

Similar topics

4
by: David | last post by:
It's sad to say, but when using the AOL web site, like to send an email, they have a nifty capability such that when a window is resized, the textarea where the message is input expands not only...
4
by: Barry Margolin | last post by:
Can I do the following with Javascript? My state has a web site that can be used for online filing for unemployment benefits. Every week I have to go to the site and fill in a form, checking...
2
by: RelaxoRy | last post by:
I have 3 texfield boxes 1. firstname 2. lastname 3. username When a person enters in their firstname and lastname, I want the username field to fill with firstnameLastinitial. Eg. ...
2
by: John Scott | last post by:
Hi there, I have a PDF that has editable form fileds. I want to be able dynamically fill in those form fields based on values I provide to the PDF. Right now, I can create an instance of the...
7
by: Daniel Walzenbach | last post by:
Hello, I want to create a Word XML file based on the input users make in a VB.NET application. I imagine creating a template in Word and saving it as a XML file. I then want to fill the...
7
by: Nikolay Petrov | last post by:
How to enumerate and fill text boxes in an WebBrowser control? TIA
19
by: Alex | last post by:
Hello list This question has probably already been asked, but let me ask again I have a mysql database to which I connect with my php scripts. The database contains articles. Name, Unit_Price...
1
by: dfetrow410 | last post by:
I ope a new window with javascript, I do a calulation in javascript. How to I fill a texbox on the opener from the new window? self.opener.document.forms.picFileName.value = cImage does not...
2
by: Guenther Sohler | last post by:
Hallo, is it possible, to use javascript to automatically fill in forms, once a site is loaded ? that means, i would write a small html document, which has javascript embedded. it would first...
5
by: yoshimishu | last post by:
i have to create two text boxes. If i fill in first text box the second textbox shoud automatically display the number of letters displayed in first text box. If the number of letters in first text...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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,...

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.