Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - this code doesn't works why??

Reply
 
Old 10-08-2008   #1 (permalink)
Rajan


 
 

this code doesn't works why??

G'day folks,

I don't know why this doesn't works
On the html page nothing is displayed i know even though m learning i
cant make such gross error?

any clues??

<html>

<body>
<script type="text/vbscript">

document.write(now)
document.write("<br>"&"The system date is "&date()&"<br/>")
document.write("I wanna check DateAdd function yyyy prototype" &
DateAdd(yyyy,1,10-Oct-2008)



</script>




</body>
</html>

My System SpecsSystem Spec
Old 10-08-2008   #2 (permalink)
Al Dunbar


 
 

Re: this code doesn't works why??


"Rajan" <rajan.paranjpe@xxxxxx> wrote in message
news:c9209add-7eca-4e26-8911-911671016a92@xxxxxx
Quote:

> G'day folks,
>
> I don't know why this doesn't works
> On the html page nothing is displayed i know even though m learning i
> cant make such gross error?
>
> any clues??
The first parameter in the call to the DateAdd function is invalid. yyyy is
an apparently undefined variable, whereas you probably intented to specify
the string value of "yyyy".

/Al
Quote:

> <html>
>
> <body>
> <script type="text/vbscript">
>
> document.write(now)
> document.write("<br>"&"The system date is "&date()&"<br/>")
> document.write("I wanna check DateAdd function yyyy prototype" &
> DateAdd(yyyy,1,10-Oct-2008)
>
>
>
> </script>
>
>
>
>
> </body>
> </html>

My System SpecsSystem Spec
Old 10-08-2008   #3 (permalink)
mayayana


 
 

Re: this code doesn't works why??

It seems to work this way:

<html>
<body>
<script type="text/vbscript">
document.write now
document.write "<br>"&"The system date is "&date()&"<br/>"
document.write "I wanna check DateAdd function yyyy prototype" &
DateAdd("yyyy", 1, "10-Oct-2008")
</script>
</body>
</html>
Quote:

> any clues??
You should have got clues from IE when you
tried to run the code. If you didn't get an error
description and line number then you need to
enable debugging in IE.




My System SpecsSystem Spec
Old 10-09-2008   #4 (permalink)
Rajan


 
 

Re: this code doesn't works why??

To mayayana:
How to enable debugging in IE??
Yes, i was wrong, I accept my mistake.thanks for renew code.
But Sorry even your code doesn't run.

To AL,
Yes, i was wrong, I accept my mistake.
Regards,
Rajan.

On Oct 9, 2:41*pm, "Al Dunbar" <AlanD...@xxxxxx> wrote:
Quote:

> "Rajan" <rajan.paran...@xxxxxx> wrote in message
>
> news:c9209add-7eca-4e26-8911-911671016a92@xxxxxx
>
Quote:

> > G'day folks,
>
Quote:

> > I don't know why this doesn't works
> > On the html page nothing is displayed i know even though m learning i
> > cant make such gross error?
>
Quote:

> > any clues??
>
> The first parameter in the call to the DateAdd function is invalid. yyyy is
> an apparently undefined variable, whereas you probably intented to specify
> the string value of "yyyy".
>
> /Al
>
>
>
Quote:

> > <html>
>
Quote:

> > <body>
> > <script type="text/vbscript">
>
Quote:

> > document.write(now)
> > document.write("<br>"&"The system date is "&date()&"<br/>")
> > document.write("I wanna check DateAdd function yyyy prototype" &
> > DateAdd(yyyy,1,10-Oct-2008)
>
Quote:

> > </script>
>
Quote:

> > </body>
> > </html>- Hide quoted text -
>
> - Show quoted text -
My System SpecsSystem Spec
Old 10-09-2008   #5 (permalink)
Joe Fawcett


 
 

Re: this code doesn't works why??



"Rajan" <rajan.paranjpe@xxxxxx> wrote in message
news:b090eb24-95ee-4b03-b601-65651bad914e@xxxxxx
Quote:

> To mayayana:
> How to enable debugging in IE??
Tools > Internet options > Advanced
Then uncheck 'disable script debugging..', there are two options, one for IE
and one for other.
This assumes you have a debugger installed. Visual Studio is probably best
but not cheap (not sure if the free one can act as an external debugger).
Otherwise there is one with Office as an optional component or a stand-alone
one from Microsoft, search for "Script debugger" on msdn.com.

--

Joe Fawcett (MVP - XML)
http://joe.fawcett.name

My System SpecsSystem Spec
Old 10-09-2008   #6 (permalink)
mayayana


 
 

Re: this code doesn't works why??

> Tools > Internet options > Advanced
Quote:

> Then uncheck 'disable script debugging..', there are two options, one for
IE
Quote:

> and one for other.
Looking at my settings in IE 5.00 I see two settings:

- Disable script debugging.
- Display a notification about every script error.

Both are unchecked. Checking the second has no
effect that I can see.
Quote:

> This assumes you have a debugger installed. Visual Studio is probably best
> but not cheap (not sure if the free one can act as an external debugger).
> Otherwise there is one with Office as an optional component or a
stand-alone
Quote:

> one from Microsoft, search for "Script debugger" on msdn.com.
>
I didn't mean that a special debugger is required.
If debugging is enabled then a script error will cause
a msgbox from IE that gives a description and line number.
(I seem to remember that if it's not enabled then one
just sees a yellow exclamation point icon in the status bar.)
The description and line # are plenty of information to
work with.

I've never understood why people install the MS
script debugger or talk about using Visual Studio. Personally
I've never actually tried using the script debugger, but
both WScript and IE will tell you the error and the line #
without needing any special debugging tools. I can't think
of any information beyond that that might be helpful.




My System SpecsSystem Spec
Old 10-10-2008   #7 (permalink)
Joe Fawcett


 
 

Re: this code doesn't works why??



"mayayana" <mayaXXyana@xxxxxx> wrote in message
news:#Fv20hhKJHA.3744@xxxxxx
Quote:
Quote:

>> Tools > Internet options > Advanced
>> Then uncheck 'disable script debugging..', there are two options, one for
> IE
Quote:

>> and one for other.
>
> Looking at my settings in IE 5.00 I see two settings:
>
> - Disable script debugging.
> - Display a notification about every script error.
>
> Both are unchecked. Checking the second has no
> effect that I can see.
>
Quote:

>> This assumes you have a debugger installed. Visual Studio is probably
>> best
>> but not cheap (not sure if the free one can act as an external debugger).
>> Otherwise there is one with Office as an optional component or a
> stand-alone
Quote:

>> one from Microsoft, search for "Script debugger" on msdn.com.
>>
>
> I didn't mean that a special debugger is required.
> If debugging is enabled then a script error will cause
> a msgbox from IE that gives a description and line number.
> (I seem to remember that if it's not enabled then one
> just sees a yellow exclamation point icon in the status bar.)
> The description and line # are plenty of information to
> work with.
>
> I've never understood why people install the MS
> script debugger or talk about using Visual Studio. Personally
> I've never actually tried using the script debugger, but
> both WScript and IE will tell you the error and the line #
> without needing any special debugging tools. I can't think
> of any information beyond that that might be helpful.
>
I agree that it's helpful, but once in the debugger you can step through the
code line by line, inspect and change variables etc.
Of course most of the time it's just simple errors that don't need this much
detail but if you are struggling to get complex Ajax style applications to
work it's much more helpful.

--

Joe Fawcett (MVP - XML)
http://joe.fawcett.name

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Error Code 81000306 - Internet Works Live Messenger
How to read Works 4 .wps files in Vista [Works 9?] Vista General
Code 8004888d can't sign in Msnger or install beta 8.5 code 0x8009 Vista security
ATI Radeon Drivers - Code 43, Code 37 & Code 10 Vista hardware & devices
ATI Display Drivers - Code 43, Code 37, Code 10 Vista hardware & devices


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46