Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Javascript - Image link to open frames page in a new browser and change the default page of one of the frames

Posted on 2006-06-07
5
Medium Priority
?
341 Views
Last Modified: 2012-08-13
Hello Experts,

I currently have an image on my page, that acts as a link to open a frames page in a new browser.
And this is working.  It looks like this:

      <A HREF="http://OurServer/Info/index.asp" target='_blank'>
      <IMG SRC="Info.gif" border="0" alt="Click here for Info">
      </A>  

The frames setup for the new page is: <LeftFrame> | <RightFrame>

But what I need this link to do as well is change the default loading page for the Right Frame.
I'm not real good with javascript, so I'd appreciate code!

Thanks,
Maurice
0
Comment
Question by:GRCHELPDESK
  • 3
5 Comments
 
LVL 25

Accepted Solution

by:
archrajan earned 2000 total points
ID: 16854982
<A HREF="http://OurServer/Info/index.asp" onclick = "openit(this);return false;">
     <IMG SRC="Info.gif" border="0" alt="Click here for Info">
     </A>  


function openit(obj)
{

var win = window.open(obj.href,"win");
win.document.getElementById("rightFrame").src = "http://www.yahoo.com";
}

where rightFrame is the id of your right frame
0
 
LVL 29

Expert Comment

by:Pravin Asar
ID: 16855005
When clicked on image/link , what page you want load in right frame ???

0
 
LVL 25

Expert Comment

by:archrajan
ID: 16855051
i validated my code and it works as expected.
let me know if it works for you
0
 
LVL 2

Author Comment

by:GRCHELPDESK
ID: 16855145
That's what I had in mind archrajan, thanks!
0
 
LVL 25

Expert Comment

by:archrajan
ID: 16855596
you are welcome.. and thanks for the points and the grade
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question