Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Javascript frame linking issue

Javascript frame linking issue
Thread Tools
Mac Elite
Join Date: Oct 1999
Location: New York, NY
Status: Offline
Reply With Quote
Mar 25, 2004, 11:32 AM
 
I've taken over webmastering of a website, but I've run into a problem I've never encountered before.

The main page has several links which jump to a frameset (frameset.html) and then open the appropriate page within one of the new frames. The problem is, it does this using a JScript thing, which isn't supported on anything besides IE. It looks like this:

<QUOTE>
<script language="JScript">
<!--
function changeTarget(target)
{
top.mainSRC = target;
top.document.all.main.src = "frameset.html";
}
// -->
</script>
</QUOTE>

And the links are like "javascript:changeTarget('aboutus.html')"

I am completely puzzled by this... I must be missing something really obvious.
     
Mac Elite
Join Date: Oct 1999
Location: New York, NY
Status: Offline
Reply With Quote
Mar 29, 2004, 09:31 PM
 
Originally posted by maxintosh:
I've taken over webmastering of a website, but I've run into a problem I've never encountered before.

The main page has several links which jump to a frameset (frameset.html) and then open the appropriate page within one of the new frames. The problem is, it does this using a JScript thing, which isn't supported on anything besides IE. It looks like this:

<QUOTE>
<script language="JScript">
<!--
function changeTarget(target)
{
top.mainSRC = target;
top.document.all.main.src = "frameset.html";
}
// -->
</script>
</QUOTE>

And the links are like "javascript:changeTarget('aboutus.html')"

I am completely puzzled by this... I must be missing something really obvious.
anyone???
     
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Mar 30, 2004, 01:00 AM
 
Try < script language="javascript" > to see if that works (the code looks pretty bog-standard)
Computer thez nohhh...
     
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status: Offline
Reply With Quote
Mar 30, 2004, 02:14 AM
 
No idea what top.mainSRC means, but you might want to use the frames collection rather than document.all to reference the frame, as document.all is only an IE thing.
Just who are Britain? What do they? Who is them? And why?

Formerly Black Book
     
   
Thread Tools
Forum Links
Forum 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 On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:04 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2