replace lines 42-70 with this code:
[CODE=javascript]
var response_receiv ed = false;
function confirm_delete( )
{
if (response_recei ved) return true;
var agre=confirm('a re you sure you want to delete the data???') ;
if(!agre) return false;
confirm_use();
return false;
}
function confirm_send(us tr)
{
var http = getHTTPObject() ;
http.open('GET' , ustr, true);
alert(ustr);
http.onreadysta techange = function()
{
if (http.readyStat e==4)
{
alert('Ready donut');
alert(http.resp onseText);
// validate response here and check if you want to send the form
if (true) // if so
{
response_receiv ed = true;
comptform.submi t();
}
}
}
http.send(null) ;
}[/CODE]
This is solution for Option 2 described in my post above (because I dont like synch ajax calls :)
[CODE=javascript]
var response_receiv ed = false;
function confirm_delete( )
{
if (response_recei ved) return true;
var agre=confirm('a re you sure you want to delete the data???') ;
if(!agre) return false;
confirm_use();
return false;
}
function confirm_send(us tr)
{
var http = getHTTPObject() ;
http.open('GET' , ustr, true);
alert(ustr);
http.onreadysta techange = function()
{
if (http.readyStat e==4)
{
alert('Ready donut');
alert(http.resp onseText);
// validate response here and check if you want to send the form
if (true) // if so
{
response_receiv ed = true;
comptform.submi t();
}
}
}
http.send(null) ;
}[/CODE]
This is solution for Option 2 described in my post above (because I dont like synch ajax calls :)
Comment