Re: Global subroutine - doesn't work

From: MD Websunlimited (none_at_none.com)
Date: 03/02/04


Date: Tue, 2 Mar 2004 10:15:27 -0600

Remove the script tags from the file.

-- 
Mike -- FrontPage MVP '97 - '02
http://www.websunlimited.com
Our latest products "At Your Command"  and IncludeASP
http://www.websunlimited.com/order/Product/AYC/ayc.htm
http://www.websunlimited.com/order/product/includeASP/includeASP.htm
"John C" <johnch@paradise.net.nz> wrote in message news:JMB0c.29530$ws.3288971@news02.tsnz.net...
> Thanks, but it doesn't seem to work. Must be me.
>
> I have the following in my script file (name "scripts.vb" in same
> directory):
>
> <script language="VBScript">
> Sub PrintDetails(CompName, Discount)
> document.writeln(Date)
> document.writeln("Coupon from " & CompName)
> document.writeln("Your discount is " & Discount & "% !!!")
> End Sub
> </script>
>
>
> and the following in my form-file:
>
> <script language="VBScript" src="scripts.vb">
> PrintDetails"My Company Ltd","10"
> </script>
>
>
> Any idea why this is not working? Error message refers to line 1 of the
> scripts file.
>
> TIA
> John
>
>
>
> "MD Websunlimited" <none@none.com> wrote in message
> news:O$svvwx$DHA.3400@tk2msftngp13.phx.gbl...
> > Hi John,
> >
> > Place in a script.vb file then use
> > <script language="VBScript" src="script.vb" >
> > </script>
> >
> > "John C" <johnch@paradise.net.nz> wrote in message
> news:hHt0c.29435$ws.3280021@news02.tsnz.net...
> > > Hi all,
> > >
> > > How can I create a Global subroutine.
> > >
> > > I have the following local subroutine,
> > >
> > > <script language="VBScript">
> > > Sub PrintDetails(CompName, Discount)
> > > document.writeln(Date)
> > > document.writeln("Coupon from " & CompName)
> > > document.writeln("Your discount is " & Discount & "% !!!")
> > > End Sub
> > > </script>
> > >
> > > but needs to be called from many forms. Thus needs to be global visible!
> > >
> > >
> > > How do I set that up?
> > >
> > > TIA,
> > > John
> > >
> > >
> >
> >
>
>


Relevant Pages

  • Re: Global subroutine
    ... > How can I create a Global subroutine. ... > I have the following local subroutine, ... > Sub PrintDetails ...
    (microsoft.public.frontpage.programming)
  • Re: Bareword "Google::Adwords::Campaign" not allowed while "strict subs" in use
    ... Grant wrote: ... Here is the beginning of my script: ... John ...
    (perl.beginners)
  • Re: Detecting is hyperthreading is enabled with WMI?
    ... It is too bad that WMI does not give this info. ... have to be done to the script. ... Public Sub DisplayProcessorInfo ... dim ProcessorSet, Processor ...
    (microsoft.public.windowsxp.wmi)
  • Re: Roadshows, Part V
    ... each of the "skits" with John and Miles, there was a part where Miles ... script with cues for the lights and sound folks. ... "Listen, you know I really dig that Priscilla chick, right?" ...
    (soc.religion.mormon)
  • Cant make this page work
    ... I can't make this script work properly. ... The script at the bottom of the html page ... Does someone have a perl ... sub output_trace_headers { ...
    (comp.lang.javascript)