Re: Can MsgBox be used in ASP file ?
- From: "Its me Earnest T." <spam@xxxxxxxxxxxxxxxxxx>
- Date: Sun, 29 Oct 2006 12:44:36 GMT
Logisticly think about what your trying to do. Your mixing server code with
client side code. Inside your <% %> server side code you are attempting to
make a msgbox appear. If this were to work then your msgbox would appear on
the server not the client. Their are many different ways to approach what
you want but the path depends on what exactly your doing. Typically you
would response.write back out any message you wish to appear. If it must
come in the form of a msgbox then you will need to do that inside client
side vbscript or you may be better off moving that to vbscript so it works
accross all browsers.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
<script language="vbscript">
function alertuser(value)
msgbox value
end function
</script>
<script language="javascript">
function alertuser(value){
alert(value);}
</script>
</head>
<body>
<input type="button" name="vbscript" title="vbscript" value="vbscript"
onclick="alertuser('vbscript')" id="Button1"><br>
<input type="button" name="javascript" title="javascript"
value="javascript" onclick="alertuser('javascript')" ID="Button2">
</body>
</html>
Bryan Martin
"Trevor L." <Trevor_L.@Canberra> wrote in message
news:Oacf5Ay%23GHA.2408@xxxxxxxxxxxxxxxxxxxxxxx
BlankThis line in testurl.asp:
19 MsgBox (cURL & " does not exist!" & "Please try again")
returns this message:
Microsoft VBScript runtime error '800a0046'
Permission denied: 'MsgBox'
/testurl.asp, line 19
cURL has been defined as
Const cURL = "http://tandcl.com.au/indexx.html"
(This is a non existent file, hence my code to trap it)
Why is it so?
Are there other VBScript statements that can't be used ?
--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
.
- References:
- Can MsgBox be used in ASP file ?
- From: Trevor L.
- Can MsgBox be used in ASP file ?
- Prev by Date: Re: Can MsgBox be used in ASP file ?
- Next by Date: Adding Date Variable to a Database Query
- Previous by thread: Re: Can MsgBox be used in ASP file ?
- Next by thread: Re: Can MsgBox be used in ASP file ?
- Index(es):
Relevant Pages
|