Solved

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

Posted on 2013-10-30
22
1,885 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
Comment Utility
Upon further investigating

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

regards
0
 
LVL 58

Expert Comment

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

Author Comment

by:joomla
Comment Utility
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
 
LVL 42

Expert Comment

by:Rob Jurd, EE MVE
Comment Utility
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
Comment Utility
thanks for that
I've followed your advise
unfortunately it didn't resolve the issue
0
 
LVL 42

Expert Comment

by:Rob Jurd, EE MVE
Comment Utility
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
Comment Utility
thanks for taking the interest, but after clearing the cache i've still got the error
0
 
LVL 42

Expert Comment

by:Rob Jurd, EE MVE
Comment Utility
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 42

Expert Comment

by:Rob Jurd, EE MVE
Comment Utility
Please try on another computer as I'm now not seeing the issue.
0
 

Author Comment

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

Expert Comment

by:Rob Jurd, EE MVE
Comment Utility
That's ok, though I would recommend fixing the validation errors. Let me know how you go
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 42

Expert Comment

by:Rob Jurd, EE MVE
Comment Utility
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 42

Expert Comment

by:Rob Jurd, EE MVE
Comment Utility
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
Comment Utility
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 42

Expert Comment

by:Rob Jurd, EE MVE
Comment Utility
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
Comment Utility
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 42

Expert Comment

by:Rob Jurd, EE MVE
Comment Utility
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 42

Expert Comment

by:Rob Jurd, EE MVE
Comment Utility
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 42

Expert Comment

by:Rob Jurd, EE MVE
Comment Utility
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 42

Accepted Solution

by:
Rob Jurd, EE MVE earned 250 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now