• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Annoying "Expected Idenitifer" error in IE 6

 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am running the capScrAndSendMail() function using the following JScript file upon the click of a link as a reference in one of my pages (within the function, I am calling upon an applet embedded in the page which contains a method that returns a String value):



When I render my page in IE 6, I get the following error on the scripting console (i.e. the alert on the status bar):

Line: 12
Char: 14
Error: Expected Identifier
Code: 0


This happens as soon as I load my page (without clicking on the link i.e.). When I refresh my page, the error seems to vanish.

I cannot spot the reason for this error being thrown even without the running of the aforementioned function. I haven't done a whole lot of Javascripting, but I cannot spot any syntactical errors either.

Can anyone help me with this? Thank you.

P.S. I'd really like to know which line the scripting console is referring to. Is it purely indicating the line in the JScript file? Or in the rendered HTML page? Does it take blank lines into account while indicating the line number?
[ July 02, 2008: Message edited by: Sridhar Venkataraman ]
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well your sleep function is going to freeze the browser. You need to learn about window.setTimeout()
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You may want to look into the IE Debug Bar or use Firefox and install Firebug.

Eric
 
Sridhar Venkataraman
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Thanks for your reply. I have heard of Firebug. Guess that's the best option to debug javascript, though I do hope they have a compatible extension for v3

As for the sleep function, it was working fine. I am not using it now because I've modified my program such that it is superfluous.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
They do have a version for ff3, it is a beta 1.2

http://getfirebug.com/releases/index.html

Eric
 
Sridhar Venkataraman
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks. I managed to debug it (or so I think for the time being atleast).

I have another pressing issue and I don't know if it can be solved using JavasScript.

As I mentioned earlier, the JScript file whose code I have posted above calls upon a method in the applet which throws a file save dialog after which control is returned to the JavaScript to call upon some VBScript.

The implementation works fine, except that as soon as the applet method is called and the file save dialog thrown, the browser appears to freeze (i.e. the file save dialog cannot be used). I have to take the focus away from the applet by clicking outside it (alt-tabbing or using the taskbar) and then return to the applet in order to make it functional and usable.

Are there any workarounds for this at all? I'd be really grateful to hear them. Although I've met the functional requirements that my application needs, this behavior is a body blow because its grossly user-unfriendly .

The browser is IE 6 and the platform is Windows 2000/XP.
[ July 02, 2008: Message edited by: Sridhar Venkataraman ]
 
Popeye has his spinach. I have this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic