Linking to two pages in JAVA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using a javascript and am including a link to a page with frames. It is necessary for me to link it to a side frame (the navagation frame) and to the main page (in another frame). Is this possible? I know how to do it in HTML but not Java. I have tried a few things but it interupts my code. Please help me out. Thanks

-Philip
 
Hi Philip,

For future reference, Java and JavaScript are 2 different technologies. Java
is a programming technology for writing executable code. JavaScript is
scripting technology for writing text scripts that can be interpreted by a
browser or some other scripting client.

Changing the location of 2 frames at once is fairly simple:

<script type="text/javascript"><!--
function changeTwo() {
parent.framename1.location = "someurl";
parent.framename2.location = "someotherurl";
}
// --></script>
<a href="javascript:changeTwo()">Click this link</a>

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

Philip said:
I am using a javascript and am including a link to a page with frames. It
is necessary for me to link it to a side frame (the navagation frame) and to
the main page (in another frame). Is this possible? I know how to do it in
HTML but not Java. I have tried a few things but it interupts my code.
Please help me out. Thanks!
 
I know that you were looking for help, but maybe you could help me. I am trying to do the same thing, but would be happy to do it in html, if I knew how. I have 3 frames. Top, Middle, Bottom. I need to create a hyperlink in the middle frame that will not only change the middle frame but the bottom frame as well. Please help if you can. Thank you.
 
Make sure the frames have unique names
Then make the link an onclick to launch a function.

onclick="load()

Then use the function to load the desired page in the desired frame.


function load() {
document.all.name1.src =page1.htm;
document.all.name2.src = page2.htm;
}


Should do it.

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer

AntMM11 said:
I know that you were looking for help, but maybe you could help me. I am trying to do the same
thing, but would be happy to do it in html, if I knew how. I have 3 frames. Top, Middle, Bottom.
I need to create a hyperlink in the middle frame that will not only change the middle frame but the
bottom frame as well. Please help if you can. Thank you.link it to a side frame (the navagation frame) and to the main page (in another frame). Is this
possible? I know how to do it in HTML but not Java. I have tried a few things but it interupts my
code. Please help me out. Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top