Solved

Link to another page within Modal Popup

Posted on 2010-09-22
6
1,006 Views
Last Modified: 2013-11-19
Hi all,

I have a link that opens up a Modal Popup. In the Modal Popup is a web page with links to other pages. When I press on one of these links, a new window opens up instead of loading the page in the Modal Popup.

Does anyone know how to get the web page to open up in the Modal Popup instead of a new window?

Thanks.

resourcesys.
0
Comment
Question by:resourcesys
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 17

Expert Comment

by:jrm213jrm213
ID: 33734573
I am guessing that the modal dialog is using an iframe to display the content. It depends on if you are loading someone elses webpage or pages that you have control over. If you are loading someone ese's content, if their links are set to open in a new window I don't think there is anything you could do. The only thing I could think of would be to use javascript to find all the links in the iframe and change their target property to "_self". If it is loading other pages from your site or sites you have control over, just change the links to not open in a new window.

I have never tried to use javascript to manipulate data in an iframe so I don't even know if it is possible.

0
 

Author Comment

by:resourcesys
ID: 33734973
Hi jrm213jrm213,

I am using the showModalDialog method.

The links where through a javascript function but if I use a normal link, there is no problem.

So, I have the option of trying to fix a javascript fix or not using javascript to link on the concerned pages.

resourcesys.
0
 
LVL 17

Expert Comment

by:jrm213jrm213
ID: 33735121
in that case you may just need to change how the javascript function that processes your links handles opening the links.  What does the code look like to process your links?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:resourcesys
ID: 33735271
window.location='mypage.htm' is what we generally use.

We have the same problem if we use Response.Redirect('mypage.htm', False) in ASP.NET.

resourcesys.
0
 
LVL 17

Expert Comment

by:jrm213jrm213
ID: 33735366
hmmm...

maybe try self.location = 'mypage.html'
0
 

Accepted Solution

by:
resourcesys earned 0 total points
ID: 33735872
Hi jrm213jrm213,

self.location didn't work.

I'm going to go with the option of using normal html links instead of Javascript to link to pages.

Also, <base target="_self"/> allows me to use the Response.Redirect command in ASP.NET.

Thanks for your input.

resourcesys.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Can't get cursor to change 3 16
arrays and buttons with user input 2 32
Calculating percentage 2 29
aria difference 2 14
Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
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…

756 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