Articles On Testing

Wecome to http://www.articlesontesting.com !!!

Articles On Testing

Wecome to http://www.articlesontesting.com !!!

Articles On Testing

Wecome to http://www.articlesontesting.com !!!

Articles On Testing

Wecome to http://www.articlesontesting.com !!!

Articles On Testing

Wecome to http://www.articlesontesting.com !!!

Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts

Javascript Pop Up Yes/No Confirmation

replace all /* */ by < >




"How to get the confirmation of Yes/No from a javascript pop up and display the value on the page using ASP.NET" ?


Create a webpage main.aspx Drag and drop a hidden control and
/*button*/ control on the web form.




Step 1.

/* Button1.Attributes.Add("onclick", "getMessage()")*/



Step 2. main.aspx Add the client side-script block


/*script language="javascript" */


function getMessage()
{
var ans;
ans=window.confirm('Is it your confirmation.....?');
alert (ans);
if (ans==true)
{ alert('Yes');
document.Form1.hdnbox.value='Yes';
}
else { alert('No');
document.Form1.hdnbox.value='No';} }


/*script*/


Step 3. main.aspx.vb To display the value of the value selected by the user in the pop up write the following code :


/*Response.Write(Request.Form("hdnbox"))*/




/*/button */ ---- Closing button tag!!!


/*input id="gwProxy" type="hidden" /*input onclick="jsCall();" id="jsProxy" type="hidden" */
/*div id="refHTML" */


/*/div*/