ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 3rd, 2003, 09:12 AM
williamcrawley williamcrawley is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: uk
Posts: 91 williamcrawley User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
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

Reply With Quote
  #2  
Old November 3rd, 2003, 11:00 AM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,843 Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 22 h 48 m 43 sec
Reputation Power: 766
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

Reply With Quote
  #3  
Old November 3rd, 2003, 03:06 PM
williamcrawley williamcrawley is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: uk
Posts: 91 williamcrawley User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
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.

Reply With Quote
  #4  
Old November 3rd, 2003, 09:13 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,843 Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 22 h 48 m 43 sec
Reputation Power: 766
Quote:
Originally posted by williamcrawley
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.

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

Reply With Quote
  #5  
Old November 4th, 2003, 03:08 AM
williamcrawley williamcrawley is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: uk
Posts: 91 williamcrawley User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > TypeMismatch calling sub


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway