HighDots Forums  

Re: Help with basics (newbie)

Javascript JavaScript language (comp.lang.javascript)


Discuss Re: Help with basics (newbie) in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
DrewM
 
Posts: n/a

Default Re: Help with basics (newbie) - 05-04-2004 , 06:14 AM






altergothen wrote:

Quote:
Please help with this basic function - I get an error saying " Object
expected on Line 17"

script language="JavaScript"
var teststring;
function myregex(teststring){
if(teststring=="test"){
alert("Match found! in " + teststring);
} else {
alert("No match found in " + teststring);
}
/script
Your function is missing a closing brace '}'.

Tip: download a Mozilla browser (I recommend Firefox) if you don't
already have one. They have a useful JavaScript Console that will give
more helpful error messages than IE. I bet it would've said something
like "Expected: } at line xx".

btw, any reason why 'teststring' is declared as a global outside of your
function?

drew.


Reply With Quote
  #2  
Old   
Ron
 
Posts: n/a

Default Re: Help with basics (newbie) - 05-04-2004 , 02:34 PM






DrewM wrote:

Quote:
...Tip: download a Mozilla browser (I recommend Firefox) if you don't
already have one. They have a useful JavaScript Console that will give
more helpful error messages than IE....
Definitely download Mozilla if you're into web development. IE's
javascript console is as useful during errors as reporting "There's
javascript on this page". :P


Reply With Quote
  #3  
Old   
Ivo
 
Posts: n/a

Default Re: Help with basics (newbie) - 05-04-2004 , 06:04 PM



"Ron" said:
Quote:
Definitely download Mozilla if you're into web development. IE's
javascript console is as useful during errors as reporting "There's
javascript on this page". :P
Well that at least will tell you javascript is recognized as such. That
Mozilla debugger is often worse than what it tries to cure.
Ivo




Reply With Quote
  #4  
Old   
Ron
 
Posts: n/a

Default Re: Help with basics (newbie) - 05-04-2004 , 06:13 PM



Ivo wrote:

Quote:
That
Mozilla debugger is often worse than what it tries to cure.
Ivo


In what ways ?


Reply With Quote
  #5  
Old   
Tia
 
Posts: n/a

Default Re: Help with basics (newbie) - 05-11-2004 , 03:23 PM



I strongly disagree. I use Mozilla Firefox 0.8 to test and debug web apps. I
find the Javascript console more helpful than anything the Microsoft debugger has
ever shown me. Faster and easier to use, more likely to give you the *real*
problem.


"Ivo" <no (AT) thank (DOT) you> wrote

Quote:
"Ron" said:
Definitely download Mozilla if you're into web development. IE's
javascript console is as useful during errors as reporting "There's
javascript on this page". :P

Well that at least will tell you javascript is recognized as such. That
Mozilla debugger is often worse than what it tries to cure.
Ivo





Reply With Quote
  #6  
Old   
Geir Eivind Mork
 
Posts: n/a

Default Re: Help with basics (newbie) - 05-11-2004 , 05:13 PM



Tia wrote:
Quote:
Definitely download Mozilla if you're into web development. IE's
javascript console is as useful during errors as reporting "There's
javascript on this page". :P
Well that at least will tell you javascript is recognized as such. That
Mozilla debugger is often worse than what it tries to cure.
Ivo
I strongly disagree. I use Mozilla Firefox 0.8 to test and debug
web pps. I find the Javascript console more helpful than anything
the Microsoft debugger has ever shown me. Faster and easier to use, more
likely to give you the *real* problem.
Get Mozilla and try wenkman. That's a javascript debugger. Javascript
console is nice as well.

IE for javascript debugging isn't a fun ride. I always use Mozilla for
that.

--
Geir Eivind - Drammen

Det er ikke gud jeg har noe imot, det er fanklubben hans jeg ikke liker.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.