Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5968715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:07:44+00:00 2026-05-22T20:07:44+00:00

I have a form in my rails 3 app that is used to create

  • 0

I have a form in my rails 3 app that is used to create new tags. This page is opened in a new window and I would like for that window to close after a successful submission of a new tag. How should I go about doing that.

I tried <%= f.submit "Create Tag", :onclick => "window.close()" %> and that didn’t work – it still followed through with the redirection.

How might I redirect to a javascript file that would close the window?


Here I tried to redirect to another html page, but it still doesn’t close when I use rails, even though it works when I just load it manually.

> <!DOCTYPE html> <html>   <head>
>     <meta http-equiv="Content-type" content="text/html; charset=utf-8">  
> </head>
> 
>   <body id="sample"
> onload="window.close()">
>     This page was meant to close itself immediately using javascript.
> If it has not, please close it
> manually.   </body> </html>
  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T20:07:45+00:00Added an answer on May 22, 2026 at 8:07 pm

    I used the best answer on this forum and it seems to work … I’m not quite sure why.

    http://www.google.com/support/forum/p/Chrome/thread?tid=23c03746e3aa03f9&hl=en

    window.open('', '_self', '');
    window.close();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to replicate this form element in my rails app, I have a
I would like to have Ajax form in Rails so i'm using form_remote_tag. The
I have a Rails form for email, and I would like to have auto-completion
I have an Ajax form in my Rails app that contains the Recaptcha markup
I'm trying to create a multi-level ajax form on my rails app that can
I have a form field in my Rails app with a placeholder. I'd like
I have a rails app I am working on that allows users to create
In my rails app, I have a long Inventory form that I want to
I have a multi-step Rails 3 form that I set up using this railscast:
I have a form in the edit view in my rails app and this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.