By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,518 Members | 1,184 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,518 IT Pros & Developers. It's quick & easy.

Javascript and frames

P: n/a
Atz
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
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Can't you just remove onclick event handler?

Or, if you must, you can put this:

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

"Atz" <ma**@mail.com> wrote in message news:bg**********@ls219.htnet.hr...
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

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.