Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

messagebox

Status
Not open for further replies.

immotal

Technical User
Sep 1, 2003
9
SG
hi is ther ani codes for creating message box using asp..i have search a few website but i m unable to find it.. realli thx a lot if anione is able to sent coding or websites teaches on creating a pop up msg box.
 
Well ASP is a pure server side thing and u can not use ASP for showing message boxes at the client side... but still we can use some alternate to do the same which apparently seems to b like msgboxes...
i have done the same in one of my web pages.

see the following code:-
//-----------------------------------------------------
<HTML>
<HEAD>
<script>
<!--
function ShowModelWindow()
{
window.showModalDialog(&quot;ShowRemarks.asp&quot;,&quot;dialogWidth:200,dialogHeight:200&quot;);
}


function ShowRemarks()
{
window.open(&quot;ShowRemarks.asp&quot;,&quot;NewWin&quot;,&quot;menubar=no,toolbar=no,status=no,width=325,height=200&quot;);
}
//-->
</script>

</head>
<BODY>
<BASE target=&quot;RightPane&quot; >
<BODY link=&quot;#FFFFFF&quot; Bgcolor=&quot;#F8C476&quot; Text=White alink=#FFFFFF vlink=#FFFFFF Onload=&quot;ShowRemarks();&quot;>
//--------------------------------------------------------
actually i have used javascript function ShowRemarks()
to open a new window apart from the original window and in that window an asp page is opened.... this is something which is done using window.

see there is one more javascript function ShowModelWindow() which shows a model window(i hope u know the differnce between model and modeless windoe) ..

try using this...



Cheers
Rakhi Kalra
 
You can also use vbscript

this will show a message box , then one of the other two depending upon which button is cancelled.


<script Language=VBScript>
if msgbox(&quot;Testing 1 2 3&quot;,vbOKCancel) = vbCancel then
msgbox &quot;Cancelled&quot;
else
msgbox &quot;Not Cancelled&quot;
end if
</script>
 
Can you use this in your ASP.NET page? or does it only work at client-side?

dpdoug
 
the first example was server side, the vbscript example is client side. I have done this with VBscript many times, but it seems to only run as client side, like the example above, not while embeded in the serverside code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top