Solved

close iframe and refresh the main page

Posted on 2007-11-29
6
2,861 Views
Last Modified: 2008-05-30
i installed this script http://jquery.com/demo/thickbox/
and it looks like this:
http://ilmc.brinkster.net/comersus/crm/thickbox/main.htm
(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:)
0
Comment
Question by:sasha85
  • 3
  • 3
6 Comments
 
LVL 75

Expert Comment

by:Michel Plungjan
Comment Utility
how about
onClick="parent.tb_remove(); parent.location.reload(1)"
0
 

Author Comment

by:sasha85
Comment Utility
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?
0
 

Author Comment

by:sasha85
Comment Utility
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...
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 500 total points
Comment Utility
... %>
password changed...
<script>
function changeIt() {
  parent.tb_remove(); parent.location.reload(1);
}

setTimeout('changeIt()',5000);
</script>
<% ...
0
 

Author Comment

by:sasha85
Comment Utility
bravo...bravo...viva la mplungjan!
0
 
LVL 75

Expert Comment

by:Michel Plungjan
Comment Utility
Wow:

Registration date: 10/27/2007
114  Questions Asked

:0
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now