• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help - PLEASE HELP ME...Function on clik to display page on diferent frame

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hello,
I am a begginer on java scripts, and I do not know much about them, but if anyone could please try to help me, please....
my problem is the following:
I have my site made in 2 frames.
So, the top Frame is a navigation bar with link and submenus like a cascade menu.
My problem is that when you click on a link in a Sub menu, the page will apear in a new page, and the top frame disapears.
What I want Is that when you click on an link on the top frame, the linked page apears on the bottom frame, and keeps the top frame always there.
This is the script:
function clic() {
les liens vont eval"<"."delay = setTimeout"<".\"parent.document.location = links"<"." + this.no + "]"<"." + this.page + "]\",10)"); }

Can Someone tell me what do I have to change so that the links displayed as I explained???
Thank you very much
P.S - I am desperate!
[ October 10, 2002: Message edited by: Cristina Proenca ]
[ October 10, 2002: Message edited by: Cristina Proenca ]
 
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cristina
JavaScript is not Java.
I'm going to move this to the HTML and JavaScript forum.
 
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
try changing
parent.document.location
to
parent.frames[1].document.location
 
Cristina Proenca
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Randall,

Thank you so, so, so, very much!!!
You just saved my life!!!
It works.
You have no Idea, for a week now I have been trying to place the right code with no sucess.

Thak you, thank you, thank you!
 
Cristina Proenca
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Randall,
Altough it works, it's giving me an error message:
It Says:
Line:0
Error:'parent.frames.1.document' is not an object
Do you Now Why???
Thank's,
Cris
 
Randall Twede
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
double check your code and make sure it reads parent.frames[1].document not parent.frames.1.document
better yet, in your frameset, give your frames names. for example:


<html>
<head>
<title>Magic Items</title>
</head>
<frameset cols="35%,65%" border="0" framespacing="0" frameborder="0">
<frame src="Index.html" name="MIIndex">
<frame src="Blank.html" name="MIMain">
</frameset>
<noframes>
This page requires a frames-capable browser.
</noframes>
</html>


then you could say MIMain.document
i hope that helps. like i said im no expert though
 
Cristina Proenca
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Randal
I tried to do as you told me, but i got the same problem.
Maybe it's not really a problem.
You see, some of the submenus have links to word, excel and powerpoint documents ( I am building an Intranet in my work )and the problem is after opening a word document, if I click on another link on the submenu, it doesn't work, and displays the error, but if I click on a link that does not have submenus it goes back to normal.
I don't know if the problem concernes a conflict with the office documents or not.
Do you think there's a way to solve it?:
I am sorry to be troubling you so much, but I do thak you a lot.
Please forgive my english, it's been a while since I write in english Language ( I am from portugal ). rolleyes:
Regards,
 
Randall Twede
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
your english is fine. i have never done menus. my guess is once you are in the menu, the current object is no longer the frame so parent refers to the frame not the frameset. hopefully someone with more experience with this can help.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What code are you using?? Menu?? That would help out in figuring what the problem is...
Eric
 
Cristina Proenca
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Eric,
I don't understand your question
Can you plesase be more especific?
The frameset is built with frontpage2000, and has 4 scripts attached, that are : links.js, navig.js, functions,js and dhtml.js.
I don't know if any of this ansewers your questions.
Please give me a hint.
Thank's
cristina
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you find this DHTML menu online? If so where...If I know what the menu is, I might be able to help you.
 
Cristina Proenca
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Eric,
Please, visit www.europcar.com and you will get the ideia.
The diference is I built mine with a frameset, and theirs is built on single pages.
Nevertheless my problem is only when the submenus open office documents. If the links on the submenus open html pages, there's no problem.
Hope to hear from you soon.

Cristina
 
Randall Twede
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
im confused now. you can open Word, Excel, and Powerpoint files from a browser now?
 
Cristina Proenca
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes Randall,
I can open word, excel and powerpoint documents, and even visio documents from a browser.
I can do this because they are inside the web.
I am building an Intranet web site, and the web and all the documents are saved within the web server.
If I do the links correctly the documents open in the bottom frame, leaving the top frame visible.
In the navigation bar ( top frame ) I have links to html documents and links to word, excel and powerpoint documents.
They really have to be in this format because this intranet is viewed by all the users in my work, and they also need to print them in this format.
I have also included links inside this documents to open other office documents related.
So you see, I only have problems when clicking on a submenu link to a word,excel or powerpoint, and after the document opens if I try to click on another link on the submenus to another document ( html or not ). Then I have to clik on a link in the main menu, and not on submenus for it to open.
If you have someway of helping me, please let me know.
Thank's,
Cristina
 
Cristina Proenca
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok,
So the error that is giving me is:
Line:0
Error:member not found
This happens after opening a word document, with a link on a submenu, and trying to open another word document in the submenu.
Do you understand this?
 
Randall Twede
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
your statement of the problem is pretty clear. i hope someone can help you with it. im not much of an expert at javascript, i much prefer server side scripting using php or jsp or servlets. i have no experience with intranets and have never served up anything other than .html, .jsp, and .php through a browser.
 
Cristina Proenca
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank's anyway Randall.
Maybe someone else can give me a hint.

Cristina
 
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you use some tools, like FrontPage to create a page, it can generate a lot of code that may be hard to deal with manually.
I guess that you tried to embed some code into the generated code, and you get problem there.
Why don't you post the relevant code here, then other people can help you more easily.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic