|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
TypeMismatch calling sub
Hi all,
in my serverside vbscript I have: call MySub(); ...... ...... then in the <Head>section I have: sub MySub() msgbox("Holding not found") end sub when I run it I get a typemismatch against the serverside call. Anybody any ideas? Thanks |
|
#2
|
|||
|
|||
|
call MySub(); '<- remove the ;
If your code is running on the server, you'll have a hard time reading the msgbox unless you happen to be in the server room ![]() |
|
#3
|
|||
|
|||
|
Have remove the ; but it's not made any difference. Although the code is run at the Server, the msgbox should come up on the Client.
|
|
#4
|
|||
|
|||
|
Quote:
How in the world would code running on the server pop up a message box on the client? You're going to need to write some code that will sent the appropriate html to the client browser.
__________________
====== Doug G ====== "Hide, hide witch! The good folk come to burn thee. Their keen enjoyment hid behind their gothic mask of duty." -Mark Clifton |
|
#5
|
|||
|
|||
|
I'm obviously looking at it too simplisticly.
You see, I have already written code in the Server that builds up my HTML page e.g. builds a table and also places buttons in the form, the buttons call subroutines from the onclick event that I have also written in the <Head> tag that put's message boxes up to the client, this all works, so I dont see why what I'm trying to do shouldn't work. THe other interesting thing is that in a couple of other forms on the server side I have used embeded javascript within my vbscript to send an alert and these work, but for some reason on this page using the same technique doesn't. so to re-cap: Response.Write("<table class=standardtext cellspacing=5 style=""position:Absolute; top:320; left:400"">") Response.Write("<tr><td><INPUT type=""button"" value=""Add"" id=btnAdd name=Addbtn onclick=""Add(" & Request.QueryString("AgentId") & ");"" style=""WIDTH: 78px""></td><td><INPUT type=""button"" value=""Authorities"" id=btnAuthorities name=Authoritiesbtn onclick=""Authorities(" & Request.QueryString("AgentId") & ");"" style=""WIDTH: 78px""></td></tr>") Response.Write("</table>") is in my serverside script. The onclick sub is held in the <HEAD> section and display's message boxes fine. Basically, the idea is that the user enters some details on a form, I do some basic validation up front, and then providing that's ok, I then go to the database to retrieve details. If the details dont exist, then I need to inform the user that there were no details so that they dont think that the system has hung (standard stuff really). Why is it so difficult to tell the user that there was nothing found, that's all I want to do. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > TypeMismatch calling sub |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|