passing parameter to a subroutine 
Author Message
 passing parameter to a subroutine

Hello,

    Something that I just cant fathom.  I'm trying to pass a string to a
subroutine when I receive an unload event from an webpage.  If I pass
something like "TEST" as a parameter it works fine, but I cannot pass "TEST
THIS".  Even quoted, it doesn't accept the string with a space.
    I probably have the n00bie glow around me turned up to full, but if
someone can throw me a bone here it would be appreciated.

Regards,

Christopher Klein
Point Software, Inc.

<script language=VBScript>
Sub SomeName(x,y,z)
    ..
    ..
End Sub
</script>

<body onunload=SomeName("TEST",10,30)>

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.*-*-*.com/ - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----



Mon, 10 Nov 2003 00:58:10 GMT  
 passing parameter to a subroutine
<body onunload='SomeName "TEST THIS",10,30'>

HTML attributes should be enclosed in quotes, and those that contain white
space (even quoted white space) MUST be enclosed in quotes.

And either use Call SomeName or lose the parentheses.

=-=-=
Steve
-=-=-


Quote:
> Hello,

>     Something that I just cant fathom.  I'm trying to pass a string to a
> subroutine when I receive an unload event from an webpage.  If I pass
> something like "TEST" as a parameter it works fine, but I cannot pass
"TEST
> THIS".  Even quoted, it doesn't accept the string with a space.
>     I probably have the n00bie glow around me turned up to full, but if
> someone can throw me a bone here it would be appreciated.

> Regards,

> Christopher Klein
> Point Software, Inc.

> <script language=VBScript>
> Sub SomeName(x,y,z)
>     ..
>     ..
> End Sub
> </script>

> <body onunload=SomeName("TEST",10,30)>



Mon, 10 Nov 2003 04:18:46 GMT  
 passing parameter to a subroutine
Thanks, that DOES make sense actually.  Problem now is its generating:
Error
Expected ';' at line...

de{*filter*} takes me to
<body onunload='SomeName "TEST THIS",10,30'>

where would it be expecting a ; in that?  I tried after the 2nd single quote
and it didnt affect anything.
The sub is literally

sub SomeName(x,y,z)
    msgbox x
end sub

Regards,
Chris

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.*-*-*.com/ - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----



Mon, 10 Nov 2003 05:39:18 GMT  
 passing parameter to a subroutine
<body onunload='VBScript:SomeName "TEST THIS",10,30'>

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--

Quote:

> Thanks, that DOES make sense actually.  Problem now is its generating:
> Error
> Expected ';' at line...

> de{*filter*} takes me to
> <body onunload='SomeName "TEST THIS",10,30'>

> where would it be expecting a ; in that?  I tried after the 2nd single quote
> and it didnt affect anything.
> The sub is literally

> sub SomeName(x,y,z)
>     msgbox x
> end sub

> Regards,
> Chris

> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> http://www.*-*-*.com/ - The #1 Newsgroup Service in the World!
> -----==  Over 80,000 Newsgroups - 16 Different Servers! =-----



Mon, 10 Nov 2003 07:41:03 GMT  
 passing parameter to a subroutine
merci buckets!!

Sometimes its ok when you don't have peers within your office to bounce
questions off of....  I've gleamed ALOT
of info from lurking around this group, you all are pretty
great!

thanks,

Christopher Klein
Point Software, Inc.

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----



Mon, 10 Nov 2003 21:03:58 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Beware of /n Software's IP*Works and its demonic license agreement!

2. Creating a pre-loading picture

3. HOW can I call a subroutine/function passing only some of the parameters

4. Problems passing a fieldname as a parameter in a subroutine

5. Passing a textfield as a parameter to a subroutine

6. Passing Variables to Subroutines

7. Pass Object Name to SubRoutine

8. passing an array to subroutine

9. Passing an object to a subroutine

10. Dictionary object not getting passed to subroutine.

11. New Business in Surrey

12. AI

 

 
Powered by phpBB® Forum Software