SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot ricklach's Avatar
    Join Date
    Nov 2004
    Location
    Victoria BC
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Closing a popup and refreshing parent page

    I have a form that has a popup where I can select various options. This popup form has a save button. What I want to do is save the contents of the popup (I can do this already), close the popup (I can't do this from within the controller) and refresh the parent page. Here is what I have so far:
    Code:
    <%= submit_tag "Save", { :type=>'button', :onclick=>"window.opener.location.reload(true); window.close()" }%>
    As you can see this refreshes the parent window and closes the popup window but it does not save the data in the popup form. Can someone help me with this problem?
    Ruby, Ruby when will you be mine

  2. #2
    SitePoint Evangelist
    Join Date
    Jun 2004
    Location
    California
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is more of a javascript problem, and I'm not javascript guru (or even a novice... im a total newbie), so maybe you shuld try and post this in the javascript forum.
    Happy switcher to OS X running on a MacBook Pro.

    Zend Certified Engineer

  3. #3
    SitePoint Member
    Join Date
    Jun 2005
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    maybe you want to submit the form instead of reloading the window?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •