• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Frames Question

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey guys, great forum.
So, question:
I'be been fiddling with frames.
I managed to get a function that changes the right frame page when I click on a link in the left one.
But I have to create a specific function for each page and assign it to each individual link on the list.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>frame 10</title>
<script language="JavaScript" type="text/javascript">
<!--
function change1()
{
parent.right_frame.location="page1.htm";
}
function change2()
{
parent.right_frame.location="page2.htm";
}
function change3()
{
parent.right_frame.location="page3.htm";
}
function change4()
{
parent.right_frame.location="page4.htm";
}
//-->
</script>
</head>

<body bgcolor="#ffffff" text="#000000">
<center>
Click the link below to change one frame.
<br />
<a href="javascript:change1()">change to page1</a><br />
<a href="javascript:change2()">change to page2</a><br />
<a href="javascript:change3()">change to page3</a><br />
<a href="javascript:change4()">change to page4</a><br />
</center>
Pagina Principal

</body>
</html>

See?
So, is there a way to capture the click as a variable or something, assign it to the change-page function and display it on the right frame?
 
author
Posts: 23958
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Moving topic to the HTML/Javascript forum...

Henry
 
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please take the time to choose the correct forum for your posts. This forum is for questions on beginning Java.

For more information, please read this.

This post has been moved to a more appropriate forum.

 
Al Pereira
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nevermind. I see more people giving help about "where to post your thread" than about Java itself.
I'm learning Java right now, isn't that a beginner's question?
"Friendly" is something people aren't here.
 
Bear Bibeault
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your question has nothing to do with Java. It is a pure HTML question. Those who can help you will not be looking for HTML questions in the beginner's Java forum, so it has been moved here where it will have a much better chance to be answered.

What's not friendly about that?
 
reply
    Bookmark Topic Watch Topic
  • New Topic