Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,471
There are 1085 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     Javascript :

"Javascript file interpreted as other" in Google Chrome

Thread title: "Javascript file interpreted as other" in Google Chrome
Reply    
    Thread tools Search this thread Display Modes  
01-14-2010, 11:33 PM
#1
JayD3e is offline JayD3e
Status: I'm new around here
Join date: Jan 2010
Location:
Expertise:
Software:
 
Posts: 6
iTrader: 0 / 0%
 

JayD3e is on a distinguished road

  Old  "Javascript file interpreted as other" in Google Chrome

Hey TalkFreelance.com! This is my first post, and I am so happy I found this site, I have been looking for an online community of web designers for quite some time now. But anyway to my question. I have enountered a very odd error while writing my latest site. Go here in Google Chromeproblem only occurs in Chrome) and you can see for yourself, www.stryv.net/newAccount_student.com. As you can see, the entire page doesn't load immediately, it is only after you hover over and element of the page(i.e. button or dropdown) that the rest of the images are loaded and placed in their respective locations.

After I looked into the problem and did some javascript debugging, I discovered that Chrome was outputting two errors,both of which dealt with the javascript fil not being interpreted as a .js file but as a plain text file. I have three total .js files on this page(the first being the jquery library), andtwo of three caused this error. Interestingly enough, when I commented out one of the .js file(postLoadValidate.js), the problem went away. So it must have something to do with that specific file. Take a look and see for yourself.

Reply With Quote
01-15-2010, 04:32 AM
#2
JayD3e is offline JayD3e
Status: I'm new around here
Join date: Jan 2010
Location:
Expertise:
Software:
 
Posts: 6
iTrader: 0 / 0%
 

JayD3e is on a distinguished road

  Old

I have continued to look into it, and it looks like it is related to the number of AJAX requests. I can only have 3 AJAX requests in that document at any one time or it will cause the error.

Reply With Quote
01-15-2010, 04:31 PM
#3
JayD3e is offline JayD3e
Status: I'm new around here
Join date: Jan 2010
Location:
Expertise:
Software:
 
Posts: 6
iTrader: 0 / 0%
 

JayD3e is on a distinguished road

  Old

I was able to fix this problem finally. It turns out that using $(document).ready(function{}); in your code doesn't always result in the function being executed on load. So my code was hanging on some AJAX connections and not completely loading. I simply added a more robust function to determne when the document was actually loaded, and then carried out my javascript.

Reply With Quote
Reply    


Currently Active Users Viewing This Thread: 2 (0 members and 2 guests)
 
Thread Tools
Display Modes

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed