Jump to content

cant able to get new values after changed at another page at onclick button


waqarnaeem

Recommended Posts

I am new in php

 

problem is that ,i have a table having 3 coloums ,id,firstname,lastname,

& 3 textboxes

 

1st at page fetch.php user give an id & after submitting the values of the row are retrieved at the 3 textboxes.

,now I want to update by changing the values of Tboxes.

 

here is a code of page fetch.php.

 

 

<script language="javascript" type="text/javascript">

var  httpobject=null;

function call(x,y,z)

{

// document.write(x,y,z);

httpobject=getHTTPObject();

if(httpobject!=null)

{

 

var url=("up.php?x="+x+"&y="+y+"&z="+z);

//document.write(url);

 

httpobject.open("GET", url ,true);

httpobject.send(null)

httpobject.onreadystatechange=setoutput;

 

 

}

}

function setoutput()

{

if(httpobject.readystate==4)

{

 

document.write(httpobject.responseText);

}

}

 

function getHTTPObject()

{

if (window.ActiveXObject)

{return new ActiveXObject("Microsoft.XMLHTTP");}

else

{

alert("Your browser does not support AJAX.");

return null;

}}

 

 

</script>

 

 

<?php

....

...

...

....

....here is the retrieving code which take an id # & give the records in below textboxes,from there i want to getting the values at up.php

....

.....

....

 

 

echo "<input  type='text'  name='one' value= '$aaa'/>";

echo  "<input  type='text'  name='y' value= '$aa' />";

echo  "<input  type='text'  name='z' value= '$bb'/>";

echo "<input type='button' onclick=\"call($aaa,'$aa','$bb')\" value=  'updatenow' />";

 

 

problem is that i cant able to get the new values of textboxes after changing in textboxes, i am getting the old values .

 

what is the problem here?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.