enable second page button from first page

I want to enable or disable the buttons from page2.php from page1.php. when i click on the submit button from page1.php it should ENABLE/DISABLE button in the page2.php without redirecting to page2.php.

here am trying to send value from page1.php to page2.php using javascript. but unable to get data.

here is what i have tried.

page1.php

<html>
<head>

function enable(){

var enable="enable";
window.location = "page2.php?temp=" + enable;
alert(enable);
}


</head>
<body>

click button to ebable or disable

<input type="submit" name="submit" id="submit" value="enable"onclick="enable();"> 

</body>
</html>

and this is my page2.php

<html>
<head>

function enable(){

var temp=Request.querystring["temp"];

alert(temp);
}


</head>
<body>

click button to ebable or disable
<br>
<input type="submit" name="submit" id="submit" value="enable" onclick="enable()"  > 

</body>
</html>

can anyone suggest how to get it.?

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s