Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 10-02-2013, 12:47 PM   #1
2MuchMark
Videochat Solutions
 
2MuchMark's Avatar
 
Industry Role:
Join Date: Aug 2004
Location: Canada
Posts: 49,062
Scripting question for brainiacs

Is there a way to refresh a parent page from a pop-up?

For example,

Imagine you have a page with a link that says "click here to sign up". When clicked a pop-up opens requesting the usual info. Once completed, the user can close that window and cause the previous or parent window to automatically refresh.

Suggestions?
__________________

Custom Coding | Videochat Solutions | Age Verification | IT Help & Support
www.2Much.net
2MuchMark is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-02-2013, 01:04 PM   #2
k0nr4d
Confirmed User
 
k0nr4d's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,228
The only thing I can think of is to do it using http push or comet.
- Source page that spawns popup has jquery requesting blah.php every second waiting for a value of "true"
- Source page loads popup
- Popup shows whatever, onUnload it runs a script to set blah.php to true
- Source page get's it's true signal and does whatever

Can be made more "live" using http push but that's the idea basically here.

Last edited by k0nr4d; 10-02-2013 at 01:05 PM..
k0nr4d is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-02-2013, 01:18 PM   #3
alcstrategy
Confirmed User
 
Industry Role:
Join Date: May 2012
Posts: 124
I think you can do this with native javascript and the window object and using window.opener to control the window which triggered the popup
alcstrategy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-02-2013, 01:19 PM   #4
Colmike9
(>^_^)b
 
Colmike9's Avatar
 
Industry Role:
Join Date: Dec 2011
Posts: 7,223
Parent page:
Code:
<script type="text/javascript">
    function OpenPopup() {
        window.open('ChildPopupWindows.aspx', '', 'width=200,height=100');            
    };
</script>

<input type="button" value="Open popup" onclick="javascript: return OpenPopup()" />
Child Page:
Code:
<script type="text/javascript">
    function CloseWindow() {
        window.close();
        window.opener.location.reload();
    }
</script>

<asp:Button ID="btnServer" runat="server" OnClick="btnServer_Click" Text="Request server" />
    <br />        
    <input type="button" value="Close Window" onclick="javascript: return CloseWindow();" />
C#:
Code:
protected void btnServer_Click(object sender, EventArgs e)
    {

    }

Or something like this in the child page using window.opener:
Code:
<script>
    window.onunload = refreshParent;
    function refreshParent() {
        window.opener.location.reload();
    }
</script>
__________________
Join the BEST cam affiliate program on the internet!
I've referred over $1.7mil in spending this past year, you should join in.
I make a lot more money in the medical field in a lab now, fuck you guys. Don't ask me to come back, but do join Chaturbate in my sig, it still makes bank without me touching shit for years..
Colmike9 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.