Solved

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

Posted on 2013-10-30
22
1,998 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

 
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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Questions about this React unit test 4 70
Debug script powershell wmi 3 20
convert Systemjs to Webpack 3 82
This script has to run not aganist multiple servers using csv 16 40
Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

733 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