Please, please help me keep my job!! 
Author Message
 Please, please help me keep my job!!

OK, I'm desperate now....

I've been programming w/ ASP  & VBScript and been running into numerous
problems with VBScript. I'm pretty sure my scripting is OK, but many methods
I want to use, particularty with FORMS, don't appear to work with my ie4.

For instance, this code is copied VERBATIM from microsoft's own library...

<HTML>
<HEAD>
<TITLE>Forms and Elements</TITLE>
<!--This demo loops through
all of the controls andchanges their value to"Changed!" -->
<SCRIPT LANGUAGE="VBScript">
<!--    Sub cmdChange_OnClick
        For i=0 To Document.frmForm.Elements.Count-1
            Document.frmForm.Elements(i).Value="Changed!"
Next
 End Sub
--></SCRIPT>
</HEAD>
<BODY>
<CENTER>
<FORM NAME="frmForm">
<INPUT TYPE="TEXT"><P>
<INPUT TYPE="TEXT"><P>
<INPUT TYPE="TEXT"><P>
<INPUT TYPE="TEXT"><P>
<INPUT TYPE="TEXT"><P>
<INPUT TYPE="BUTTON" NAME="cmdChange"
VALUE="Push and Watch the Controls!"><P>
</FORM>
</CENTER>
</HTML>

This doesn't work on my ie4 -- I get an error saying "Line 11. Char 2.
Expected Statement".

I've tried to use the COUNT property/method with forms on some of my pages
and I keep on getting statements saying that COUNT is not supported. Are
there any ideas about this?

I've also run into problems with SUBMITTING FORMS using VB Code.

Is there some setting on ie4 that I've missed?? Is there something
fundamental property of FORMS that I'm not aware of?
Does anyone have any tips about FORMS????

Any help would be greatly appreciated....

Yours grovelingly,

Nic Doodson



Mon, 23 Jul 2001 03:00:00 GMT  
 Please, please help me keep my job!!
Hi Nic,

Whoa, calm down.

VBScript treats the HTML comment <!-- the same as a VBScript comment --
you've commented out the first line of your program.  You want to put the
"Sub cmd..." on the _next line_.  You're getting a "Statement expected"
error because the compiler is hitting an "End Sub" when it never saw a "Sub"
that matches it -- the compiler is expecting a statement here, not the end
of a subroutine.

Where did you see this in our documentation?  Send me details of where you
found this sample code and I'll have the documentation team fix it.

Eric


Quote:
> OK, I'm desperate now....

> I've been programming w/ ASP  & VBScript and been running into numerous
> problems with VBScript. I'm pretty sure my scripting is OK, but many
methods
> I want to use, particularty with FORMS, don't appear to work with my ie4.

> For instance, this code is copied VERBATIM from microsoft's own library...

> <HTML>
> <HEAD>
> <TITLE>Forms and Elements</TITLE>
> <!--This demo loops through
> all of the controls andchanges their value to"Changed!" -->
> <SCRIPT LANGUAGE="VBScript">
> <!--    Sub cmdChange_OnClick
>         For i=0 To Document.frmForm.Elements.Count-1
>             Document.frmForm.Elements(i).Value="Changed!"
> Next
>  End Sub
> --></SCRIPT>
> </HEAD>
> <BODY>
> <CENTER>
> <FORM NAME="frmForm">
> <INPUT TYPE="TEXT"><P>
> <INPUT TYPE="TEXT"><P>
> <INPUT TYPE="TEXT"><P>
> <INPUT TYPE="TEXT"><P>
> <INPUT TYPE="TEXT"><P>
> <INPUT TYPE="BUTTON" NAME="cmdChange"
> VALUE="Push and Watch the Controls!"><P>
> </FORM>
> </CENTER>
> </HTML>

> This doesn't work on my ie4 -- I get an error saying "Line 11. Char 2.
> Expected Statement".

> I've tried to use the COUNT property/method with forms on some of my pages
> and I keep on getting statements saying that COUNT is not supported. Are
> there any ideas about this?

> I've also run into problems with SUBMITTING FORMS using VB Code.

> Is there some setting on ie4 that I've missed?? Is there something
> fundamental property of FORMS that I'm not aware of?
> Does anyone have any tips about FORMS????

> Any help would be greatly appreciated....

> Yours grovelingly,

> Nic Doodson



Mon, 23 Jul 2001 03:00:00 GMT  
 Please, please help me keep my job!!
Hey Peter,

Well, it's very charitable of you to describe our behaviour as "correct".
"Hacked up" would be another way to put it -- the idea that comments in one
language (HTML) should be parsable by the script languages is pretty weird.
What they should have done in the first place is defined a specification for
opaque tags in HTML (something like XML) so that downlevel browsers would
ignore both the tag and its contents.

But we're stuck with it now.

Eric


Quote:

> >VBScript treats the HTML comment <!-- the same as a VBScript comment --
> >you've commented out the first line of your program.

> Another thing to look out for:

> You should also comment out the closing SGML comment tag (-->). Although
IE
> handles it correctly, Navigator will not. OK, so this doesn't apply to
> VBScript (which Navigator doesn't support) but if you write any
JavaScript,
> Navigator will {*filter*}on '-->' unless you comment it out, eg:

> <script>
> <!--
> document.write("hello");
> // -->
> </script>

> Peter

> --
> Peter Torr, Developer / Webmaster, Vantage Systems Australia.




Mon, 23 Jul 2001 03:00:00 GMT  
 Please, please help me keep my job!!

Quote:
>VBScript treats the HTML comment <!-- the same as a VBScript comment --
>you've commented out the first line of your program.

Another thing to look out for:

You should also comment out the closing SGML comment tag (-->). Although IE
handles it correctly, Navigator will not. OK, so this doesn't apply to
VBScript (which Navigator doesn't support) but if you write any JavaScript,
Navigator will {*filter*}on '-->' unless you comment it out, eg:

<script>
<!--
document.write("hello");
// -->
</script>

Peter

--
Peter Torr, Developer / Webmaster, Vantage Systems Australia.



Tue, 24 Jul 2001 03:00:00 GMT  
 Please, please help me keep my job!!

Quote:
>Hey Peter,

>Well, it's very charitable of you to describe our behaviour as "correct".
>"Hacked up" would be another way to put it -- the idea that comments in one

Heh ;-) I didn't actually mean "correct" in the real sense - I haven't
actually checked the spec to see what is supposed to happen ;-). Rather I
was using the developer's definition of "correct", which goes something like
this:

    correct: adj. [Of a computer program's behaviour] Exactly what I wanted
it to do.

Peter :-)

--
Peter Torr, Developer / Webmaster, Vantage Systems Australia.



Fri, 27 Jul 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP,

2. Can anyone HELP me PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE

3. PLEASE HELP PLEASE HELP PLEASE HELP

4. PLEASE PLEASE PLEASE HELP!!!!

5. Help, please please please!!!! Inputing a Hexadecimal Number

6. Strategy to keep dbs in sync - please help

7. Design Help PLEASE PLEASE PLEASE!

8. Please Please PLEASE HELP!!!!!

9. URGENT HELP PLEASE PLEASE PLEASE???

10. Please please please, help me :-)

11. Please, Please, Please I need help working with dates

12. Please, please, please help!!

 

 
Powered by phpBB® Forum Software