SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: closing a popup

  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

    I have the following code in a popup:
    Code:
    <%= link_to 'create a new voter now?', :controller => 'voters', :action => 'new', onclick => 'window.close()' %>
    However, the popup window does not close. Can someone tell me what the correct syntax is?

    Rick
    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)
    Well you're missing a : in front of the "onclick" but you should check the HTML to make sure it is generating it correctly.
    Happy switcher to OS X running on a MacBook Pro.

    Zend Certified Engineer


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
  •