Populate value into HTML page

Ads
 

Populate value into HTML page

Hi,

How to populate values from one html page table to another html page..?

Thanks

View Answers

December 7, 2012 at 5:09 PM

Here is an example that sends the data of one html file to another.

1)page1.html:

<html>
<form type=get action="page2.html">
<table>
<tr>
<td>First Name:</td>
<td><input type=text name=firstname size=10></td>
</tr>
<tr>
<td>Last Name:</td>
<td><input type=text name=lastname size=10></td>
</tr>
<tr>
<td>Age:</td>
<td><input type=text name=age size=10></td>
</tr>
<tr>
<td colspan=2><input type=submit value="Submit">
</td>
</tr>
</table>
</form>
</html>

2)page2.html:

<html>
<script LANGUAGE="JavaScript">
function getParams(){
var idx = document.URL.indexOf('?');
var params = new Array();
if (idx != -1) {
var pairs = document.URL.substring(idx+1, document.URL.length).split('&');
for (var i=0; i<pairs.length; i++){
nameVal = pairs[i].split('=');
params[nameVal[0]] = nameVal[1];
}
}
return params;
}
params = getParams();
firstname = unescape(params["firstname"]);
lastname = unescape(params["lastname"]);
age = unescape(params["age"]);
document.write("firstname = " + firstname + "<br>");
document.write("lastname = " + lastname + "<br>");
document.write("age = " + age + "<br>");
</script>
</html>

Ads









Related Tutorials/Questions & Answers:
Populate value into HTML page
Populate value into HTML page  Hi, How to populate values from one html page table to another html page..? Thanks
I want to Populate ComBobox value from database that combox is Itemrenderer of DataGrid.
I want to Populate ComBobox value from database that combox is Itemrenderer of DataGrid.  I want to Populate ComBobox value from database that combox is Itemrenderer of DataGrid
Advertisements
Populate listbox according to selection value from another selectbox
Populate listbox according to selection value from another selectbox  ... but in that solution page will refreshed and then it will populate the course... for campus and another for course. When i select campus i want to populate
passing textbox value from one page to another page using html n javascript
passing textbox value from one page to another page using html n javascript  on button onclick event pass text box value and i want to pass value... on the othe (next/prevoious)page please help me   1)page1.html: <html>
Populate values from html to another html
Populate values from html to another html In this tutorial, you will learn how to send values from one html page to another. Here, we have create a html... on another html page. page1.html: <html> <form type=get action="
store html value in the sqllite 3 php
store html value in the sqllite 3 php  i have a php script that will parse html page content link and view but i need to know how to store this content in the sqlite3 database any suggestion ? include_once('simple_html_dom.php
divide html page
divide html page   how to divide html page into 3 parts without using frames
HTML Login Page Code
HTML Login Page Code Here is an example of html login page code... JavaScript validation in Login page. We have set username and password value... on their credentials. For making login page for websites HTML form and HTML elements
html login page with ajax
html login page with ajax  hi all... i want to create a login page using html and ajax for validation is must. please help me doing that with code... width="184"><input type="text" name="username" id="user" size="20" value
HTML login page code
HTML login page code  Hi all, I am writing my first HTML JavaScrip... the complete HTML JavaScript code for User Login Page. Thanks in Advance!   ...;td colspan=2><font size=3><center><b>HTML Login Page
Show Hyperlink in HTML Page
Show Hyperlink in HTML Page   ... code show you a HTML page, that create a link to another page. The code begins...; On execution of html code, the page is displayed as  The web
html program to create home page
html program to create home page  html program to create home page
Create HTML page using java
Create HTML page using java   Hi, I need to create an html page to export some information. Currently, by using java, i've exported information to excel. But now, I would like to view it in HTML instead of excel. Is there any
coding for home page using html
coding for home page using html  coding for home page using html
what is the code for login page in html
what is the code for login page in html  Hi, I am total beginner in HTML coding. I want to make a login page in HTML to understand the form coding... page in html? How to create login page in HTML? Thaks
what is the code for login page in html
what is the code for login page in html  Hi, I am total beginner in HTML coding. I want to make a login page in HTML to understand the form coding... page in html? How to create login page in HTML? Thaks
what is the code for login page in html
what is the code for login page in html  Hi, I am total beginner in HTML coding. I want to make a login page in HTML to understand the form coding... page in html? How to create login page in HTML? Thaks
How to give value for select in HTML dynamically using javascript
How to give value for select in HTML dynamically using javascript  hi. Consider the situation i am having 2 select options called degree and department. if i select a degree the departments corresponding to that degree only
How to redirect from a HTML page?
How to redirect from a HTML page?  Hi, Is it possible to redirect from HTML page to another page on the net? I have one page and I want to redirect... to redirect to another page using HTML code. You can use the following code: <meta
selenium webdriver get page html
selenium webdriver get page html  Hi, I am working on a project to test web application. There is requirement to get the full content of page as HMTL. How to get page html in selenium webdriver? Thanks   Hi, Here
populate dropdown box
populate dropdown box  hi, Is there any ways in which i can populate my dropdown menu with values from 1 to n (n = the value stored in database)using java script or jsp, either is fine? Ex: If value corresponding to selected
How to pass the value from controller to jsp page ?
How to pass the value from controller to jsp page ?  HI I need to pass the value from controller to jsp. I use the way like this Controller...("login.html");//login.jsp resolved as login .html return modelAndView
receiving null value in back bean by the jsf page
receiving null value in back bean by the jsf page  i have done above things but i m receiving null value in back bean by the jsf page plz tell me solution as soon as possible
How to add two calendars on the same html page
use single calendar for a single html page.but while implementing two calendars on same html page it doesn't work..The first calendar works but the second...How to add two calendars on the same html page  I have used the same
to store data entered in html page
to store data entered in html page  i want to a job site, in this site user can registered by a form.. in this form there are his information... i use two forms for it 1)for user name,password, submit button 2)for text field
to upload a table from DB to the same html page
to upload a table from DB to the same html page  how to make this booklist table to be opened in the same html page itself using a third frame
session value not get in many jsp page.
session value not get in many jsp page.  I am using servlet to set...,response); and get session value on jsp page by follwing:- String user=(String... page its give null value
passing text value from pop up to parent page
passing text value from pop up to parent page  i want to pass value of a textbox of one pop up window to its parent page(html). that parent page contain a table. And i want to pass that text value to one cell in table of parent
pre-populate form
pre-populate form  how to pre populate form in php   what do you mean by pre populate
populate Combo Box dynamically
populate Combo Box dynamically  Hi, How to populate the Combo Box dynamically using Flex with Jsp's
Get radio button value after submiting page
Get radio button value after submiting page  Radio buttons are dynamically generated.After selecting radio button & submitting the page , the value of the selected radio button get displayed in that jsp page. <

Ads