i have created a code which post a uid to a different server on confirm dialog click and on button click it works fine the code below
for confirm box:
Button:
but i also want to redirect to another page when i click confirm or button,so i changed the code with
confirm box:
Button:
but now its not working it showing error
the code using for posting data:
for confirm box:
Code:
function andpop()
{
var qes = confirm( " " );
if ( qes )
clicked( '1135' );
}
Code:
input type="button" value="click" onClick="return clicked('1135');">
confirm box:
Code:
function andpop()
{
var qes = confirm( " " );
if ( qes )
window.location ="buf";
clicked( '1135' );
}
Code:
<a href="www.google.com"><input type="button" value="click" onClick="return clicked('1135');"></a>
the code using for posting data:
Code:
function clicked( uid ) {
$.ajax({
url: 'http://example.com/jquery/member/count.php',
type: 'GET',
data: 'uid='+uid,
dataType: 'jsonp',
jsonp: false,
jsonpCallback: 'methodCallback',
success: function( data ) {
if( data.message == "yes" ) {
alert("d");
} else {
alert( "failed, maybe uid its not exists in database" );
}
},
error: function( Request, error ) {
alert( error );
}
});
}
Comment