PDA

View Full Version : JavaScript Help



puzo
September 29th, 2002, 06:04
I have a site which has two frames; the left is a menu & the right is to show the page when clicking on a button on the menu (main frame)
I used to have a simple HTML+GIF's menu, now i made a menu using Xara Webstyle & the JS file is an item which is shown as a menu, the problem is whenever i click one of the buttons which are on the menu the page is opened in that same frame instead of the main frame, can somebody edit the JS file so the links would open on the main frame rather than on the menu frame?
here's the JS file:

www.arc-corp.net/puzo/gelbase.js

Mike

Jan
September 29th, 2002, 06:41
Will anyone download gelbase to view your code? I sure won't. :nervous:

puzo
September 29th, 2002, 10:10
so what should i do?

Mike

WebWizard
September 29th, 2002, 11:16
Mike, to get your links to open in another frame, instead of the current frame that they are in, you need to include the "TARGET" attribute:
<A HREF="yourlink" TARGET="Frame Name">Click Here</A>

- Replace Frame Name with the name of the frame you wish the link to open in! 9Frame Names are defined in your <FRAMESET> i.e. <FRAME SRC="page.html" NAME="Frame Name">)

Kind Regards,
Mark Harrington,
The WebWizard - A 'Fully-Featured' HTML Editor for your WebBrowser!
Check us out at: http://www.the-webwizard.co.uk/

puzo
September 29th, 2002, 12:45
yeah i know what <target> is, its in JS, not HTML therefore its written differently, check my *.JS file

Mike

Dusty
September 29th, 2002, 13:10
No, it's the same.

writeButton("","about.html","gelbase_b1",130,40,"Page 1","target_here",0);

Put your desired target there for all the writeButton calls, or if you prefer, just edit this line:

if(target!="")target=" target=\""+target+"\"";

...to be:

target=" target=\"target_here\"";

puzo
September 29th, 2002, 13:18
thank you, finaly, ill try that

Mike

puzo
September 29th, 2002, 13:25
son of a gun, it worked, thnx a bunch
really, thnx alot

Mike