image
image

|


Go Back   macosx.com > Design, Media, Programming & Scripting > Design & Media

Reply
 
Thread Tools
  #1  
Old April 11th, 2003, 02:17 PM
MDLarson's Avatar
I love my WRX.
 
Join Date: Feb 2002
Location: Minneapolis, MN
Posts: 1,159
Thanks: 0
Thanked 0 Times in 0 Posts
MDLarson is on a distinguished road
JavaScript on text links... Doesn't work on local pages?

Page: http://www.larsonsystems.com/products/ect/
Click on any option or accessory in the table towards the bottom.

This is weird. I developed the HTML in Dreamweaver MX (in OS 9.)

I have been testing my pages in IE 5 (in OS 9,) on a local copy using relative links. I attach behaviors to text links using a procedure suggested by Macromedia (see technote 15495.)

I attach the Behavior "Open Browser Window" to many options on my product pages, and it works great. I can click the links successfully on a live web site on the following systems:

Windows 95 / Internet Explorer 5?
Windows XP / Internet Explorer 6
Mac OS 9 / Internet Explorer
Mac OS X 10.2.5 / Internet Explorer 5
Mac OS X 10.2.5 / Netscape 6
Mac OS X 10.2.5 / Safari 1.0 Beta
Mac OS X 10.2.5 / Chimera / "Navigator" 0.2.7
Mac OS X 10.2.5 / OmniWeb 4.1 Beta 6

OK, so the links work on a real live website. But when I try to load a local copy of the website on my OS X machine, the links are dead!

I tried replacing "javascript:;" with "javascript:void(0)" and "#" according to another MM Technote, but that didn't work either.

My question is this: Is there any Javascript issue with Mac OS X that prohibits my links from working correctly on a local HTML file?

p.s. I'm trying to get my iMac ready for a tradeshow. I'm leaving this weekend, so any response will probably not make it, but I'm hugely curious about this issue.
Reply With Quote
  #2  
Old April 11th, 2003, 04:25 PM
lurk's Avatar
Mitä?
 
Join Date: Mar 2002
Location: Land o' skeeterz
Posts: 2,076
Thanks: 0
Thanked 0 Times in 0 Posts
lurk is on a distinguished road
Are you serving the pages to yourself via the local web server i.e. http://localhost/~yername/coolpage.html or as a file via file:///Users/yername/lousypage.html

If you aren't using the local server then try that.

-Eric
__________________
Wenn ist das Nunstruck git und Slotermeyer? Ja!...
Beiherhund das Oder die Flipperwaldt gersput!
Reply With Quote
  #3  
Old April 11th, 2003, 06:32 PM
MDLarson's Avatar
I love my WRX.
 
Join Date: Feb 2002
Location: Minneapolis, MN
Posts: 1,159
Thanks: 0
Thanked 0 Times in 0 Posts
MDLarson is on a distinguished road
Quote:
Originally posted by lurk
Are you serving the pages to yourself via the local web server i.e. http://localhost/~yername/coolpage.html or as a file via file:///Users/yername/lousypage.html

If you aren't using the local server then try that.

-Eric
Hmm, that's a good suggestion. I believe draggin'-n-droppin' pages defaults to the file:/// method. I'll try it out.
Reply With Quote
  #4  
Old April 13th, 2003, 07:08 PM
TommyWillB's Avatar
Registered User
 
Join Date: Mar 2001
Location: ol' Gay San Francisco
Posts: 1,999
Thanks: 0
Thanked 0 Times in 0 Posts
TommyWillB is on a distinguished road
1) I'd definately reccomend the # thing in your HREF attributes. Since you are doing all of the work in OnClick.

2) Your JavaScript function has some redundant/nested comment tags. They should not hurt, but can not help:
Code:
<script language="JavaScript">
<!--
<!--
function MM_reloadPage(init)  { ... }
MM_reloadPage(true);
// -->

function MM_openBrWindow(theURL,winName,features) { ... }
.
.
.
//-->
</script>

I DID download this page locally and it works as expected (no images, css, etc) with IE/OS X 10.2.5. The little windows poped up and tried to load the other pages.

Maybe there is some security thing in your browser that does not let scripting (JavaScript) run locally? Or if you are in Safari, maybe the pop-up blocker behaves differently for local pages than for server-based ones.


Like MDLarson said... you can dump all of your files in /Library/WebServer/Documents/ turn Web Sharing (Apache) on, and then load them from http://localhost/ ...Or you can edit your /etc/httpd/httpd.conf file to make your Dreamweaver folder your Apache docroot.
__________________
TommyWillB
Intel iMac 250GB external drive
TommyWillB.com hosted on Mac OS X 10.4.x / Apache 1.3.x / PHP 4.x
Reply With Quote
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
many html pages don't work pedz Mac OS X System & Mac Software 2 May 22nd, 2003 11:51 PM
Omniweb updated edX Mac OS X System & Mac Software 1 February 9th, 2003 10:23 AM
Help, my man pages don't work! wyvern Unix & X11 7 January 29th, 2003 12:17 AM
Explorer 5.1.3 links dont work? PowermacG4_450 Mac OS X System & Mac Software 2 March 22nd, 2002 02:57 PM
Does links allow access to password-protected pages? DominikHoffmann Mac OS X System & Mac Software 3 January 19th, 2002 02:33 AM


All times are GMT -5. The time now is 11:21 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.