Current location: Hot Scripts Forums » General Web Coding » JavaScript » Javascript not running in all browsers


Javascript not running in all browsers

Reply
  #1 (permalink)  
Old 03-16-10, 09:10 PM
xavier039 xavier039 is offline
Newbie Coder
 
Join Date: Aug 2006
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
Javascript not running in all browsers

I have this site freshly designed and the script won't load the other pages in all browsers. For now it works in Firefox and IE8 Chrome on PC and Safari on Mac only for me. Other people can not get it to work at all on their computers. Any ideas why?

Here is the site link. Tom Roof Portfolio
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 03-16-10, 09:37 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
Run the code through a validator.

The W3C Markup Validation Service

The W3C CSS Validation Service

It may help you to identify the issue.

PS - Awesome home page.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 03-17-10, 01:37 AM
xavier039 xavier039 is offline
Newbie Coder
 
Join Date: Aug 2006
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
I ran it through both of them and did not give me any luck.

Thank you for the comment. Now if I could only get it working everywhere.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 03-17-10, 07:04 AM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
What browsers are not working?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 03-17-10, 09:59 AM
xavier039 xavier039 is offline
Newbie Coder
 
Join Date: Aug 2006
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
I had the
HTML Code:
<script type="text/javascript">var BASE_URL='http://www.atomike.com/tomroof';</script>
set to
HTML Code:
<script type="text/javascript">var BASE_URL='http://atomike.com/tomroof';</script>
so that was the cause.

Now I just need to figure out how to make it work on both [http://www.atomike.com/tomroof] and [atomike.com/tomroof] (minus the www). It depends on browser by browser and operating server on if it wants to work properly or not. I can't say when and why it does work and does not.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 03-17-10, 12:57 PM
xavier039 xavier039 is offline
Newbie Coder
 
Join Date: Aug 2006
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
Fixed it all with:

HTML Code:
<script type="text/javascript"> 
var BASE_URL='http://www.atomike.com/tomroof'; 
if (window.location.href.indexOf('www') < 0){ 
BASE_URL='http://atomike.com/tomroof'; 
} 
</script>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #7 (permalink)  
Old 03-17-10, 03:24 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
Good job! And thanks for posting your solution.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks

Tags
css, html, javascript (ajax)


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Senior JavaScript Developer - Full Time - Permanent - London AJAX, CSS, JSONP Chris Peacock Job Offers & Assistance 0 01-19-10 01:28 PM
Running Javascript code returned form an AJAX call End User JavaScript 6 09-14-09 03:34 PM
Running javascript before sending php mail phpdoctor PHP 3 04-04-07 04:47 PM
Reaaly stuck about javascript over frames muratisik JavaScript 1 12-14-03 12:58 PM


All times are GMT -5. The time now is 09:23 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.