LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-07-2013, 06:05 PM   #1
Johng
Member
 
Registered: Feb 2002
Location: NZ
Distribution: Kubuntu, Mint
Posts: 408

Rep: Reputation: 31
Doulble html link


Can someone tell me what is wrong with this:

<a href="Menu.html" target="leftFrame" onClick="mainFrame.location='aboutus.html';">Return to&nbsp;main menu</a><br>

I want to return to a menu and page from another menu and page.
 
Old 08-07-2013, 11:14 PM   #2
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,870
Blog Entries: 1

Rep: Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871
Try to do everything from JS:
Code:
<span onclick="leftFrame.location.href='Menu.html'; mainFrame.location.href='aboutus.html'">Click</span>
 
Old 08-08-2013, 12:26 AM   #3
Johng
Member
 
Registered: Feb 2002
Location: NZ
Distribution: Kubuntu, Mint
Posts: 408

Original Poster
Rep: Reputation: 31
Thanks, unfortunately that does not create a hyperlink, only an inactive Click.

This is the line I am trying to replace with dual action:
<br>
<a href="Menu.html">Return to&nbsp;menu</a><br>
<br>

The line below jumps to Menu.html, but does not open aboutus.html in mainFrame

<a href="Menu.html" target="leftFrame" onClick="mainFrame.location='aboutus.html';">Return to&nbsp;main menu</a><br>
 
Old 08-08-2013, 02:20 AM   #4
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,870
Blog Entries: 1

Rep: Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871
If you so want it to be an anchor, then try this:

Code:
<a href='#'
   onclick="leftFrame.location.href='Menu.html';
            mainFrame.location.href='aboutus.html';
            return false;">Click</a>

Last edited by NevemTeve; 08-08-2013 at 02:27 AM. Reason: syntax
 
Old 08-08-2013, 04:51 AM   #5
Johng
Member
 
Registered: Feb 2002
Location: NZ
Distribution: Kubuntu, Mint
Posts: 408

Original Poster
Rep: Reputation: 31
Thank you again. This time Click is a hyperlink, but does nothing.

Below is the complete file (with your suggestion included), may be there's something missing?

The real site is fmc.org.nz/kaumatua



<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>

<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>Kaumatua Tramping Club Inc</title>

<meta name="description" content="a club formed to enjoy tramping at a pace governed by our age and wisdom">
<meta name="keywords" content="Kaumatua, Tramping">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="STYLESHEET" type="text/css" href="Menu.css"></head><body style="color: rgb(0, 0, 0); background-color: rgb(176, 202, 220); background-image: url(menu.gif); height: 665px;" alink="#000099" link="#000099" vlink="#990099">
<br>

<br>
<big style="font-style: italic;"><big><span style="font-family: Helvetica,Arial,sans-serif;"></span></big></big><span class="menuTXT"></span><big style="font-style: italic;"><big><span style="font-family: Helvetica,Arial,sans-serif;"></span></big></big><small style="font-family: sans-serif;"><small><br>
</small></small>
<div style="position: absolute; left: 12px; width: 171px; top: 207px; height: 493px;"><span><span style="font-weight: bold; font-style: italic; font-family: sans-serif;">Trampers tales</span><br class="menuTXT12">
<br class="menuTXT12">
<small><a style="font-family: sans-serif;" class="menuTXT12" href="essay.html" target="mainFrame">There's old in them <br>
thar hills</a><br style="font-family: sans-serif;" class="menuTXT12">
<br style="font-family: sans-serif;" class="menuTXT12">
<a style="font-family: sans-serif;" class="menuTXT12" href="cascade.html" target="mainFrame">From the Cascade<br>
Coast to the Red Hills </a><br style="font-family: sans-serif;" class="menuTXT12">
<br style="font-family: sans-serif;" class="menuTXT12">
<a style="font-family: sans-serif;" class="menuTXT12" href="northern.html" target="mainFrame">A Northern
Crossing <br>
of the Tararuas</a><br style="font-family: sans-serif;" class="menuTXT12">
<br style="font-family: sans-serif;" class="menuTXT12">
<a style="font-family: sans-serif;" class="menuTXT12" href="best-ever.html" target="mainFrame">The
Best Trip Ever</a></small>

<br class="menuTXT12">
</span><span class="menuTXT"><br>
</span><span><small><a style="font-family: sans-serif;" class="menuTXT12" href="puki-ariki.html" target="mainFrame">Puli Ariki - Hills of the Chiefs</a><span style="font-family: sans-serif;"></span><br>
</small></span><span class="menuTXT"><br>
</span><span><small><a style="font-family: sans-serif;" class="menuTXT12" href="Sayer_hut.html" target="mainFrame">Part of our History</a></small></span><br>
<span class="menuTXT">
<br>
</span><span></span><small><a style="font-family: sans-serif;" class="menuTXT12" href="sensuous.html" target="mainFrame">A Very Senuous Day</a></small><br>
<span class="menuTXT">
<br>
<br>
<br>

<a href='#'
onclick="leftFrame.location.href='Menu.html';
mainFrame.location.href='aboutus.html';
return false;">Click</a>


<br>
<br>
<small>Views expressed <br>
are those of the writer</small></span></div>
<img style="position: absolute; top: 66px; left: 9px;" alt="club badge" src="badge.png" height="113" width="113">
</body></html>
 
Old 08-08-2013, 05:23 AM   #6
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,870
Blog Entries: 1

Rep: Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871
There is no leftFrame or mainFrame in your source. Please use [code] and [/code] tags when quoting source.
 
Old 08-08-2013, 05:45 PM   #7
Johng
Member
 
Registered: Feb 2002
Location: NZ
Distribution: Kubuntu, Mint
Posts: 408

Original Poster
Rep: Reputation: 31
Re: There is no leftFrame or mainFrame in your source.

What does that mean? The left and main frames work as they should, other than the "Return to Menu" function I'm trying to implement. Is it defined in the index.html file?

Code:
<frameset cols="165,*" frameborder="NO" border="0" framespacing="0" rows="*"> 
  <frame name="leftFrame" scrolling="NO" noresize src="Menu.html">
  <frame name="mainFrame" src="aboutus.html">
</frameset>
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
html broken link detection bigearsbilly Linux - Software 1 07-29-2009 08:22 AM
How to create symbolic link to html file and avoid page link problem? haxpor Linux - General 2 01-29-2008 07:40 AM
Suse - like everything except the inability to doulble click and run executables ForYouAndI.com SUSE / openSUSE 10 03-14-2006 04:14 PM
Link references in html printings fiomba Programming 2 01-27-2005 11:57 AM
Creating HTML page with link in C jorgedf Programming 3 08-01-2003 02:47 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration