Go Premium for a chance to win a PS4. Enter to Win


close iframe and refresh the main page

Posted on 2007-11-29
Medium Priority
Last Modified: 2008-05-30
i installed this script http://jquery.com/demo/thickbox/
and it looks like this:
(using iframe inside the window)

the code to close this open iframe is onclick="self.parent.tb_remove();"
(if you paste it from inside the iframe)

now, i got a change password page that opens inside this window...when the user wrote his new pasword and got a response.write "password changed"...i want that after few seconds this window will be cose(timeout and self.parent.tb_remove();") but main problem is how when this page closes to refresh the main page too...

i realy don;t know if it doable but i will hope someone help:)
Question by:sasha85
  • 3
  • 3
LVL 75

Expert Comment

by:Michel Plungjan
ID: 20380355
how about
onClick="parent.tb_remove(); parent.location.reload(1)"

Author Comment

ID: 20382127
ok..it work with a button but how can o do this automaticaly...how i put it into code that will run when i will get to it?

i mean i can put it into script that will run this when the code bump into this code?

Author Comment

ID: 20382188
after changing the pasword i want that there will be response write "pasword changed" and then
after 5 seconds that ="parent.tb_remove(); parent.location.reload(1)"

i cannot use body onload cause it's all in one page and it will be closed before user filled the fields...
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

LVL 75

Accepted Solution

Michel Plungjan earned 2000 total points
ID: 20382599
... %>
password changed...
function changeIt() {
  parent.tb_remove(); parent.location.reload(1);

<% ...

Author Comment

ID: 20387079
bravo...bravo...viva la mplungjan!
LVL 75

Expert Comment

by:Michel Plungjan
ID: 20387240

Registration date: 10/27/2007
114  Questions Asked


Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

This article discusses how to create an extensible mechanism for linked drop downs.
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
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

876 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