Code Simplified – Viral Sarvaiya

Code Simplified – Viral Sarvaiya, Web Developer Friends, dot net Developer, Sql Server Developer

querystring in to javascript and HTML page Redirect.

Posted by Viral Sarvaiya on March 13, 2009

In the HTML page, we can not use the value of one page to second page without useing server side coding.

to do that we have to use javascript.

Step 1 :  Make a file1.html



<Form name=”frmDefault” action=”file2.htm” method=”get”>

<p>Item1: <Input Type=”text” name=”txtItem1″></p>
<p>Item2: <Input Type=”text” name=”txtItem2″></p>
<p><Input type=”submit”></p>


step 2 : Make file2.html

<Script Language=”Javascript”>
var arrArgs =“&”);

for (var i=0; i<arrArgs.length; i++) {
document.write (‘<p>’ + arrArgs[i] + “</p>”);

javascript write a value of querystring that comes to another  page.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: