HighDots Forums  

Javascript and frames

Javascript JavaScript language (comp.lang.javascript)


Discuss Javascript and frames in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Atz
 
Posts: n/a

Default Javascript and frames - 07-28-2003 , 11:01 AM






How to open existing page in the mainFrame.

My start page has 4 frames and on the left side are menu links in table,
with some effects .

Like:
<td height="23" align="center" valign="center" bordercolor="#666666"
bgcolor="#E1E1E1" style="cursor:hand" onclick="window.location='page1.html'"
onmouseover="bgColor='#FFFFCC'" onmouseout="bgColor='#E1E1E1'">

<a href="page1.html" target="mainFrame" class="tditem"> Search</a>

</td>

If i use this code the page is loaded into same page and not in mainFrame.

I tryed with this :
onclick="parent.mainFrame='page1.html'"

but there is no effect...

Thanx in advance



Reply With Quote
  #2  
Old   
Vjekoslav Begovic
 
Posts: n/a

Default Re: Javascript and frames - 07-28-2003 , 05:27 PM






Can't you just remove onclick event handler?

Or, if you must, you can put this:

onclick="parent.mainFrame.location='whatever.htm'"

"Atz" <mail (AT) mail (DOT) com> wrote

Quote:
How to open existing page in the mainFrame.

My start page has 4 frames and on the left side are menu links in table,
with some effects .

Like:
td height="23" align="center" valign="center" bordercolor="#666666"
bgcolor="#E1E1E1" style="cursor:hand"
onclick="window.location='page1.html'"
onmouseover="bgColor='#FFFFCC'" onmouseout="bgColor='#E1E1E1'"

a href="page1.html" target="mainFrame" class="tditem"> Search</a

/td

If i use this code the page is loaded into same page and not in mainFrame.

I tryed with this :
onclick="parent.mainFrame='page1.html'"

but there is no effect...

Thanx in advance





Reply With Quote
Reply




Thread Tools
Display Modes

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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.