Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need a link to open in the main page from pop up

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I really need help. I'm trying to have my pop up window (with links) load in the page below, without opening a new window.


The breakdown is this. I have a main page that loads...then a link that creates a small pop up window...now I need that pop up window's links to change the info in the main page below. Can anyone help me fix this problem.


See the problem for yourself:



I'm grateful to all those who can help
 
Hello TitoMang!

You need use links like this:
<a href=&quot;JavaScript:self.opener.location='YOUR_URL_HERE'&quot;>link text</a>

Good Luck!
 
That works...but not just right. I need the pop up window to remain the same and the main window to change. Anyone?
 
Hello Titomang!

I don't understand you...
The code I gave you changes only the main window and remain the pop up. That sounds like what you need.
 
Yes. The main window changes, but the pop up changes to a white page and displays the text &quot;schedule.htm&quot; (that is the text that I used in place of &quot;'YOUR_URL_HERE'&quot; I will send you the file if you like, maybe that would be better. My employer has been asking for this, and I'm sort of stuck. It would be a blessing if you could help.
 
Hi Titomang!

Now I see! You need to do it calling JS function like this

<html>
<head>
<title>Untitled Document</title>
<script language=&quot;JavaScript&quot;>
<!--
function ChangeURL(theURL)
{
self.opener.location=theURL;
}
//-->
</script>

<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
</head>

<body bgcolor=&quot;#FFFFFF&quot; text=&quot;#000000&quot;>
<a href=&quot;JavaScript:ChangeURL('schedule.htm')&quot;>link text</a>
</body>
</html>

It works!
 
Thank you SOOOOOOOOO much! You don't even know how much you have helped me out. I was pulling my hair out trying to figure this out. Thankfully you did, and I'm very grateful.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top