JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 5th, 2001, 10:03 AM
true2u1 true2u1 is offline
ÐÊšîGñË®
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Posts: 66 true2u1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
Send a message via ICQ to true2u1 Send a message via AIM to true2u1
External javascript files and AOL??

Does AOL have a problem with external javascript files?

I put up a demo site for a prospective client and they reported errors through AOL's browser, but it worked in IE.

The site is Here...

If anyone else finds they are getting line errors, please tell me browser and version if you will.

BTW I HATE AOL

Reply With Quote
  #2  
Old December 5th, 2001, 12:51 PM
degsy degsy is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2001
Posts: 1,882 degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 Days 21 h 19 m 30 sec
Reputation Power: 18
I get errors using NS4.7
The Mouseovers on the buttons work, so it must be one of your other functions.

NS6 and IE6 are fine.

Reply With Quote
  #3  
Old December 5th, 2001, 01:19 PM
true2u1 true2u1 is offline
ÐÊšîGñË®
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Posts: 66 true2u1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
Send a message via ICQ to true2u1 Send a message via AIM to true2u1
I checked on Netscape 4.74 and got no errors. hmm..

I hate this compatability crap

Reply With Quote
  #4  
Old December 5th, 2001, 04:40 PM
true2u1 true2u1 is offline
ÐÊšîGñË®
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Posts: 66 true2u1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
Send a message via ICQ to true2u1 Send a message via AIM to true2u1
OK I think I have a handle on what the problem is, but I am not sure what to do about it. It works fine in IE 5.5 but not in IE 5.0

The script runs a function to set the button which links to the current page to the down image after checking the current URL and doing a regular expression string comparison. In earlier browser versions, it is not finding the image object when it runs this function. It does not run the function until after the page has loaded the images. Why it is not finding the objects is a mystery to me. If you click on of the text links to another page, the script runs just fine, as does all subsequent link clicks.

Anyone have any ideas on fixing this or know someone else running a similar script?

Reply With Quote
  #5  
Old December 5th, 2001, 05:32 PM
Derek Petersen Derek Petersen is offline
Do you like PHP like ME?
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Location: St. George, Utah, of the USA
Posts: 67 Derek Petersen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 12
I use ie mainly but I have aol and the mouseover isn't working. used to have aprogram that did it for me but I lost it seeing I haven't used it forever thanks to css...and either my internet's slow or your site is really bulky. It took forever to view. I would change mouseover scripts to something more crosscomptable. Otherwise ur really minimizing ur audience.
__________________
You know your a web programmer when you see a '$' and think of PHP rather than money.

Reply With Quote
  #6  
Old December 5th, 2001, 06:32 PM
true2u1 true2u1 is offline
ÐÊšîGñË®
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Posts: 66 true2u1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
Send a message via ICQ to true2u1 Send a message via AIM to true2u1
Hopefull I found the problem. For some reason, I had document.location.href instead of window.location.href ... oops.

Can I get some testers to let me know if it is still a problem?

The host that I use for my own is sometimes slow. I just have the demo up for testing purposes. Maybe when I am making real money doing web design, I will get a better host. All the images are under 6k... most under 2k with the exception of the property images. (the slowness could be AOL too).

Here are the functions:

Code:
function checkPage() {
	if (document.images) {
		var activePage = ""
		var activeURL = ""
		var pageName = window.location.href
		reRoot = new RegExp (/\W$/)
		reIndex = new RegExp ("index.html")
		reListings = new RegExp ("listings.html")
		reAgents = new RegExp ("agents.html")
		reCompany = new RegExp ("company.html")
		reLinks = new RegExp ("links.html")
	
	if (reRoot.test(pageName)) {
		activePage = "index";
		activeURL = "images/" + activePage + "-over.jpg";
		}
	if (reIndex.test(pageName)) {
		activePage = "index";
		activeURL = "images/" + activePage + "-over.jpg";
		}
	if (reListings.test(pageName)) {
		activePage = "listings";
		activeURL = "images/" + activePage + "-over.jpg";
		}
	if (reAgents.test(pageName)) {
		activePage = "agents";
		activeURL = "images/" + activePage + "-over.jpg";
		}
	if (reCompany.test(pageName)) {
		activePage = "company";
		activeURL = "images/" + activePage + "-over.jpg";
		}
	if (reLinks.test(pageName)) {
		activePage = "links";
		activeURL = "images/" + activePage + "-over.jpg";
		}
	document[activePage].src = activeURL;
	}
}

function switchOver(btn) {
	if (document.images) {
		var activePage = ""
		var activeURL = ""
		var pageName = window.location.href
		reRoot = new RegExp (/\W$/)
		reIndex = new RegExp ("index.html")
		reListings = new RegExp ("listings.html")
		reAgents = new RegExp ("agents.html")
		reCompany = new RegExp ("company.html")
		reLinks = new RegExp ("links.html")
		
		if (reRoot.test(pageName)) {
			activePage = "index";
			activeURL = "images/" + activePage + "-over.jpg";
			}
		if (reIndex.test(pageName)) {
			activePage = "index";
			activeURL = "images/" + activePage + "-over.jpg";
			}
		if (reListings.test(pageName)) {
			activePage = "listings";
			activeURL = "images/" + activePage + "-over.jpg";
			}
		if (reAgents.test(pageName)) {
			activePage = "agents";
			activeURL = "images/" + activePage + "-over.jpg";
			}
		if (reCompany.test(pageName)) {
			activePage = "company";
			activeURL = "images/" + activePage + "-over.jpg";
			}
		if (reLinks.test(pageName)) {
			activePage = "links";
			activeURL = "images/" + activePage + "-over.jpg";
			}
		if (btn == activePage) {
			document[btn].src = activeURL;
			}
		else {
			imgFile = "images/" + btn + "-over.jpg";
			document[btn].src = imgFile;
			imgActive = "images/" + activePage + ".jpg";
			document[activePage].src = imgActive;
			}
		}
	}
	
function switchOut(btn) {
	if (document.images) {
		var activePage = ""
		var activeURL = ""
		var pageName = window.location.href
		reRoot = new RegExp (/\W$/)
		reIndex = new RegExp ("index.html")
		reListings = new RegExp ("listings.html")
		reAgents = new RegExp ("agents.html")
		reCompany = new RegExp ("company.html")
		reLinks = new RegExp ("links.html")
		
		if (reRoot.test(pageName)) {
			activePage = "index";
			activeURL = "images/" + activePage + "-over.jpg";
			}
		if (reIndex.test(pageName)) {
			activePage = "index";
			activeURL = "images/" + activePage + "-over.jpg";
			}
		if (reListings.test(pageName)) {
			activePage = "listings";
			activeURL = "images/" + activePage + "-over.jpg";
			}
		if (reAgents.test(pageName)) {
			activePage = "agents";
			activeURL = "images/" + activePage + "-over.jpg";
			}
		if (reCompany.test(pageName)) {
			activePage = "company";
			activeURL = "images/" + activePage + "-over.jpg";
			}
		if (reLinks.test(pageName)) {
			activePage = "links";
			activeURL = "images/" + activePage + "-over.jpg";
			}
		imgFile = "images/" + btn + ".jpg";
		document[btn].src = imgFile;
		document[activePage].src = activeURL;
		}
	}

Reply With Quote
  #7  
Old December 6th, 2001, 08:28 AM
true2u1 true2u1 is offline
ÐÊšîGñË®
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Posts: 66 true2u1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
Send a message via ICQ to true2u1 Send a message via AIM to true2u1
I think I have pinpointed the problem. When you first go to the site, the URL is http://pinnacledesigns.tv/mcweb/ and at the bottom of the index.html page is a script that writes 4 things:

the value of activePage from the function checkPage()
the value of activeURL from the function checkPage()
the value of window.location.href
the value of document.URL

If you load any URL by specifying the html page, you get no errors and http://pinnacledesigns.tv/mcweb/index.html returns all values. http://pinnacledesigns.tv/mcweb/ does not return any values. The function checkPage() relies on a returned URL to set the button state. That is where the error occurs.

In checkPage(), the variable
Code:
reRoot = new RegExp (/\W$/)


is supposed to set the value as a regular expression of a non-character at the end of the string and

Code:
if (reRoot.test(pageName)) {
	activePage = "index";
	activeURL = "images/" + activePage + "-over.jpg";
	}


is supposed to compare the URL to the regular expression. It works with IE 5.5 but not earlier versions. I am trying to find a work around but have not found anything yet. If someone has any other ideas, please let me know.

Reply With Quote
  #8  
Old December 6th, 2001, 08:56 AM
true2u1 true2u1 is offline
ÐÊšîGñË®
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Posts: 66 true2u1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
Send a message via ICQ to true2u1 Send a message via AIM to true2u1
Well it looks like I have no choice but to use a redirect to solve it. If anyone has any other solutiuons I'd like to hear them, but for now, this will work.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > External javascript files and AOL??

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap