Solved

jquery-1.8.3.min.js ....... unexpected token

Posted on 2013-10-30
22
1,972 Views
Last Modified: 2013-11-11
When using IE9 & IE10 we get the following error in the IE debugger

HTML1506: Unexpected token

We get this with both the jquery-1.8.3 full and min versions of the file

The error has no impact on IE8, Chrome or Firefox

can you help?
0
Comment
Question by:joomla
22 Comments
 

Author Comment

by:joomla
ID: 39613544
Upon further investigating

The issue may be more related to the Windows 7 OS 32bit

regards
0
 
LVL 58

Expert Comment

by:Gary
ID: 39614821
Sorted?
If not have you a link to the page, sounds like an ajax problem
0
 

Author Comment

by:joomla
ID: 39615131
Hi Gary
no, not sorted yet... but not an ajax issue
all site content is on one page.
jquery ui commands are used to reveal content

www.gumleafgreen.com

thanks
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 43

Expert Comment

by:Rob
ID: 39616027
Ok this is goiing to be the issue:
</body> 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="js/vendor/bootstrap.min.js"></script>
<script src="js/vendor/jquery-ui-1.10.3.custom.min.js"></script>
<script src="js/vendor/jquery.cycle.all.js"></script>
<script src="js/vendor/jquery.easing.1.3.js"></script>
<script src="js/vendor/jquery.mousewheel.js"></script>
<script src="js/vendor/detectmobilebrowser.js"></script>
<script src="js/vendor/jquery.mCustomScrollbar.concat.min.js"></script>
<script src="js/main.js"></script>

Open in new window


You cannot have script tags after the end </body> tag! :)

Move these inside ie:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="js/vendor/bootstrap.min.js"></script>
<script src="js/vendor/jquery-ui-1.10.3.custom.min.js"></script>
<script src="js/vendor/jquery.cycle.all.js"></script>
<script src="js/vendor/jquery.easing.1.3.js"></script>
<script src="js/vendor/jquery.mousewheel.js"></script>
<script src="js/vendor/detectmobilebrowser.js"></script>
<script src="js/vendor/jquery.mCustomScrollbar.concat.min.js"></script>
<script src="js/main.js"></script>
</body> 

Open in new window

0
 

Author Comment

by:joomla
ID: 39616031
thanks for that
I've followed your advise
unfortunately it didn't resolve the issue
0
 
LVL 43

Expert Comment

by:Rob
ID: 39616032
I was getting the error but since you've just updated it that error has gone away...

*EDIT* I've tested this is IE10, IE9 and IE8 and no error.

Did you clear your cache and reload?
0
 

Author Comment

by:joomla
ID: 39616034
thanks for taking the interest, but after clearing the cache i've still got the error
0
 
LVL 43

Expert Comment

by:Rob
ID: 39616037
On another note it is important to keep your site validated as it will be the biggest cause of issues with your page:  http://validator.w3.org/check?uri=http%3A%2F%2Fwww.gumleafgreen.com%2F&charset=%28detect+automatically%29&doctype=Inline&group=0
0
 
LVL 43

Expert Comment

by:Rob
ID: 39616040
Please try on another computer as I'm now not seeing the issue.
0
 

Author Comment

by:joomla
ID: 39616042
unfortunately we only have one windows 7 32bit pc here
it doesn't happen on other PCs, Macs or mobile devices
0
 
LVL 43

Expert Comment

by:Rob
ID: 39616073
That's ok, though I would recommend fixing the validation errors. Let me know how you go
0
 
LVL 43

Expert Comment

by:Rob
ID: 39616120
I don't doubt that it could be related to the OS but before you go reinstalling IE or the OS I would do what you can to fix the issues with the code itself
0
 
LVL 43

Expert Comment

by:Rob
ID: 39616131
I've tested on win8.1 64bit, Win7 64bit, and Win7 32-bit on IE10,9,8 all without issue so I suspect it's going to be that one PC giving you a problem.  Can you use a program like ccleaner to clear the temp internet files and all cache, restart and try again and see if you get any more problems
0
 

Author Comment

by:joomla
ID: 39616264
thanks for your continued interest
I've restarted our modem but issue still persits

only on the pc with windows 7 32bit
both chrome & ie9 & ie10   (i tried both on the same machine)

problem does not occur on browsers on other PCs using different OS

I agree that it should be an OS issue, but it's the only factor that is different
0
 
LVL 43

Expert Comment

by:Rob
ID: 39616271
Sorry I actually meant for you to restart your pc.
So the issue it's also on chrome as well?
0
 

Author Comment

by:joomla
ID: 39616272
i should have mentioned that I restarted it before restarting the modem
yes, the issue is chrome & ie on this particular machine

I'm testing on this machine because a person told me the site wasn't working on their machine and the only thing I could find different from my own set up was their version of windows

I tried on windows7 but it still worked
then I tried on windows 7 32bit and it failed ?

I'm open to ideas, but I think I may have to try different scripting approach
0
 
LVL 43

Expert Comment

by:Rob
ID: 39616280
I wouldn't be so quick to jump to conclusions. Remember I saw the error before you moved the script tags inside the body. I saw the errors on a win 7 32 bit pc, win 7 64 bit and a win 8.1 64 bit. I now don't see the errors in any of them in any browser.
I would check with the person that said it wasn't working to confirm that it's still the case
0
 
LVL 43

Expert Comment

by:Rob
ID: 39616282
As for a different scripting approach, ask the script tags should be in the head section anyway.if you need them to be run after they page has loaded take advantage of the window.load event or the $(document).ready() jQuery function
0
 
LVL 43

Expert Comment

by:Rob
ID: 39616285
So you know, I understand your frustration with this, I've been there myself,  which is why I'm sticking around to try and help you fix this :-)
0
 
LVL 43

Accepted Solution

by:
Rob earned 250 total points
ID: 39616343
The idea would be to isolate this issue as being only present on that one pc.  Given I've tested your site with win7 32-bit and not had a problem, it rules out the OS for now.

I suspect it's just that one computer in which case you can hand that over to an IT tech to fix some random issue with the OS.

As for the code, it's looking ok with just a few issues to fix:
You have 5 DIVs with the ID of cke_pastebin.  The ID of an element must be unique.  If they have common properties then I suggest using a class instead.
You have 2 input elements with the same ID of inputEmail1.  i suspect this is just a copy and paste mistake given the placeholder for the first one is "Name", which the second is "Email"
Probably another copy/paste error as the <label> for the Message: is referring to "inputPassword1" in the for attribute.
0
 
LVL 29

Expert Comment

by:fibo
ID: 39616832
You did not confirm that you used ccleaner as suggested.
Can you do that?
Can you check if you have cookies remaining for this website? (ccleaner could wipe them, but in case you are -wrongly- reluctant to use it...) and wipe them...
0
 

Author Closing Comment

by:joomla
ID: 39638392
Hi Tagit,
thanks for your massive contribution last week
unfortunately despite our best efforts, the site continued to fail unexpectedly and had to be abandoned for the time being.

I'm closing it with extra points for terrific advise and support
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
inactive users 13 82
Need to Modify a Script I found 5 108
Bulk Reorder File Names 4 69
AWK: Am I duplicating the comma delimiter in this code? 5 25
Ever wondered how to display how many visitors you have online. In this tutorial I will show you an easy but effective way to display the number of online visitors in WhizBase. In this article I assume you have read my previous articles and know …
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question