PDA

View Full Version : Webbrowser and javascript



yonu
July 20th, 2011, 04:41 PM
If needed I can post screenshots I am finishing up a page in my NR skin but the problem is i get Javascript errors however if I open the same page directly in IE it works fine.

Any ideas would be great,
Yonu

yonu
July 28th, 2011, 06:44 PM
is this such a hard issue to address? I really need a solution for this

tmorten
July 29th, 2011, 12:54 AM
You have not provided enough information to be able to help you.

yonu
July 29th, 2011, 12:57 AM
Ok What information do I need to provide? As I said the page will not open in the NR browser without JS errors but if I open it in IE on the same device/PC it works

tmorten
July 29th, 2011, 01:54 PM
I presume the context in which you are seeing the issue is an embedded browser window in your NR page?

If so, what is the javascript that is being executed, and what are the errors that it is producing?

Do other pages execute/render correctly in that same embedded browser window?

What OS version are you running on, and what NR version are you running on?

yonu
July 29th, 2011, 04:26 PM
Ok yes it is the embedded Browser window

the JS being executed is a web interface for XBMC the error is expected identifier, string or number

other pages yes however they are not JavaScript based.

I have tried win7 and winXP netremote version is 2.0.16.139 on one and 2.0.21 on the other

Thanks,
yonu

tmorten
July 29th, 2011, 08:30 PM
When you look at the line that is failing in the javascript, what do you see?

Anyone else out there running XBMC who has tried it in an embedded browser window?

yonu
July 29th, 2011, 10:08 PM
ok the error is for the error is simply }; and expected identifier

I take it that the web plugin for NR is more than simply a IEwrapper? As it works fine when opened directly in IE

tmorten
July 30th, 2011, 08:53 AM
The implication is that the block of javascript leading up to that bracket has some sort of missing identifier. If you look through that code block, you may be able to identify the source of the error.

I'm not sure why the jscript parse through NR would behave differently than the jscript parse in IE. Identifying the specific code that is triggering the error may be edifying.

yonu
July 30th, 2011, 01:35 PM
here is the block of code that goes along with the error I don't see anything wrong with it
clearAudioPlaylist: function(options) {
var settings = {
onSuccess: null,
onError: null,
};

Edit: if it helps I ran the same js file through the windows script host and I get the same error Expected identifier, string or number Code 800A0404

tmorten
July 30th, 2011, 02:59 PM
Not enough context to understand the root issue unfortunately...

yonu
July 30th, 2011, 05:37 PM
I have attached the js file the error is at line 542 Char 4 As I see nothing wrong with the code

tmorten
August 1st, 2011, 09:43 AM
Remove the comma that terminates the line before the curly brackets (541) - that is a syntax error in Javascript.

yonu
August 1st, 2011, 02:07 PM
thank you very much for the help I have been coding JS for years and never knew that was improper coding in fact I was taught to use the trailing comma apparently IE and mozilla are very forgiving by default

Thanks,
again

tmorten
August 1st, 2011, 04:14 PM
Glad to help!

Cheers,
Tim