For Programmers: Free Programming Magazines  


Home > Archive > Visual Studio > February 2005 > Script and Forms









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Script and Forms
n2K

2005-02-15, 9:02 pm

As I'm relativley new to ASP and VBscript, could someone explain (or point
me to) how
client side VBscript works on an ASP page. In particular, I have an ASP page
that has a body with a form. I want to create a function to return the value
of a text field. I would like to call the function with the onsubmit event.

But alas, I get all kinds of errors. Any direction would be helpful.

Also, when an ASP page loads with a form element and VBscript code, which
executes first? The script or the form?

TX...


Kevin Spencer

2005-02-16, 4:03 pm

Client side VBScript works intermittently in an ASP page. That is because it
is only supported by IE. If you want your client-side script to work in all
browsers, use JavaScript. As to "how" it works, well, it's magic. Actually,
I just have no idea what "how [it] works" means. Also, you say you want to
"create a function to return the value of a text field." Return it to where?
For what purpose?

> Also, when an ASP page loads with a form element and VBscript code, which
> executes first? The script or the form?


As the form doesn't "execute," and you didn't specify whether you're talking
about client-side or server-side VBScript, that questin can't be answered as
stated.

Programming does not in any way involve guesswork. One should be acquainted
with the technology, and how it works, before writing a single line of code.
Programming is precise. Close only counts in horseshoes and hand grenades.
Your question indicates that you have only a vague idea of what ASP is, and
how it works. That's not a good starting point for writing a program.

Finally, this is a Visual Studio newsgroup. If you have questions about ASP,
visit microsoft.public.Inetserver.asp.general.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"n2K" <newbie@mentorits.com> wrote in message
news:eoWUFf7EFHA.3928@TK2MSFTNGP15.phx.gbl...
> As I'm relativley new to ASP and VBscript, could someone explain (or point
> me to) how
> client side VBscript works on an ASP page. In particular, I have an ASP
> page
> that has a body with a form. I want to create a function to return the
> value
> of a text field. I would like to call the function with the onsubmit
> event.
>
> But alas, I get all kinds of errors. Any direction would be helpful.
>
> Also, when an ASP page loads with a form element and VBscript code, which
> executes first? The script or the form?
>
> TX...
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com