473,395 Members | 1,763 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

My menu disappears...

Hello,
I've got a problem and I hope someone could help me.
I have a page that contains frames. Below a piece of code:
....
<FRAMESET COLS="120,*">
<FRAME NAME="menu" SRC="menu.html" >
<FRAME NAME="main" SRC="main.html">
</FRAMESET>
....
The page menu.html contains the following code:
....
<a href="javascript:window.open('test1.pdf','main')" doc1 </a>
<BR>
<a href="javascript:window.open('test2.pdf','main')" doc2 </a>
.....
The problem is that when I click on frame "menu" the links "doc1" and
"doc2" the pdf is correctly loaded (through the plug-in) but the
content of the frame "menu" disappears and appears the inscription
"[object]". This does not happen if the links doc1 and doc2 are
realized without JavaScript.
This problem is the exemplification of a more complicate case where
the menu.html contains a tree menu that for each item you have to
specify a ref = "code". Inside it I put a javascript function to be
executed because I have to load a pdf inside a different frame.
The question is if I could avoid the disappearing of menu frame using
a different approach or a simply modification of my javascript code.
Could you help me?

Reagards,

Camelot

Apr 17 '07 #1
2 1926
On 17 Apr 2007 05:15:12 -0700, in comp.lang.javascript camelot
<sc****@tiscalinet.it>
<11**********************@l77g2000hsb.googlegroups .comwrote:
>| Hello,
| I've got a problem and I hope someone could help me.
| I have a page that contains frames. Below a piece of code:
| ...
| <FRAMESET COLS="120,*">
| <FRAME NAME="menu" SRC="menu.html" >
| <FRAME NAME="main" SRC="main.html">
| </FRAMESET>
| ...
| The page menu.html contains the following code:
| ...
| <a href="javascript:window.open('test1.pdf','main')" doc1 </a>
| <BR>
| <a href="javascript:window.open('test2.pdf','main')" doc2 </a>
| ....
| The problem is that when I click on frame "menu" the links "doc1" and
| "doc2" the pdf is correctly loaded (through the plug-in) but the
| content of the frame "menu" disappears and appears the inscription
| "[object]". This does not happen if the links doc1 and doc2 are
| realized without JavaScript.
| This problem is the exemplification of a more complicate case where
| the menu.html contains a tree menu that for each item you have to
| specify a ref = "code". Inside it I put a javascript function to be
| executed because I have to load a pdf inside a different frame.
| The question is if I could avoid the disappearing of menu frame using
| a different approach or a simply modification of my javascript code.
| Could you help me?
|
| Reagards,
|
| Camelot
You can either place
<base target="main.html" />
within the menu.html header
or
<a href="javascript:window.open('test2.pdf','main')"
target="main.html" >

---------------------------------------------------------------
jn******@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
Apr 17 '07 #2
On Apr 17, 2:26 pm, Jeff North <jnort...@yahoo.com.auwrote:
On 17 Apr 2007 05:15:12 -0700, in comp.lang.javascript camelot
<sco...@tiscalinet.it>

<1176812112.252828.298...@l77g2000hsb.googlegroups .comwrote:
| Hello,
| I've got a problem and I hope someone could help me.
| I have a page that contains frames. Below a piece of code:
| ...
| <FRAMESET COLS="120,*">
| <FRAME NAME="menu" SRC="menu.html" >
| <FRAME NAME="main" SRC="main.html">
| </FRAMESET>
| ...
| The page menu.html contains the following code:
| ...
| <a href="javascript:window.open('test1.pdf','main')" doc1 </a>
| <BR>
| <a href="javascript:window.open('test2.pdf','main')" doc2 </a>
| ....
| The problem is that when I click on frame "menu" the links "doc1" and
| "doc2" the pdf is correctly loaded (through the plug-in) but the
| content of the frame "menu" disappears and appears the inscription
| "[object]". This does not happen if the links doc1 and doc2 are
| realized without JavaScript.
| This problem is the exemplification of a more complicate case where
| the menu.html contains a tree menu that for each item you have to
| specify a ref = "code". Inside it I put a javascript function to be
| executed because I have to load a pdf inside a different frame.
| The question is if I could avoid the disappearing of menu frame using
| a different approach or a simply modification of my javascript code.
| Could you help me?
|
| Reagards,
|
| Camelot

You can either place
<base target="main.html" />
within the menu.html header
or
<a href="javascript:window.open('test2.pdf','main')"
target="main.html" >

---------------------------------------------------------------
jnort...@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------- Hide quoted text -

- Show quoted text -
Thank you! The "base" solution is perfect!

Camelot

Apr 17 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: der kommissar | last post by:
Hi all I'm having a small problem with a navigation menu on a site i'm doing. The address of the site is: http://www.statik.be/radiomol/ All works perfectly fine in FireFox, Opera and...
12
by: Kyle James Matthews | last post by:
Hello, I have been lurking here for a little bit (truth be told, I lurk on too many newsgroups to be truly effective). I have made a CSS rollover menu, and would like some advice. The menu is...
3
by: unurban | last post by:
I have a javascript menu based off of unordered lists that only shows the subnav links when you click on the main nav links. is there a way to keep any subnav items open after you click on a link...
3
by: ThunderMusic | last post by:
Hi, I'm trying to have a MSN Messenger like form/app closing behavior. When I click on the X button, I only want the form to disappear and when I double-click on the notify icon or right-click...
0
by: Tom | last post by:
AccessXP in Access2000 mode I have a membership form with several subforms where membership information is entered. I have a popup form that displays the membership number, name and address. I...
5
by: Dean L. Howen | last post by:
Dear friends, Could we determine when context menu should appear?
4
by: Fred | last post by:
Hi, I have a list box with a context menu. When I right click the menu appears as expected. However when I select an option on the context menu the menu does not close. The click event on the...
4
by: stuckagain | last post by:
Hi, I have a page with a scrollable DIV, and within that DIV, I have a few asp.net menu controls. The idea being, the user mouses over the small icons and is presented with a list of options. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.