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 6800329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:57:21+00:00 2026-05-26T18:57:21+00:00

<%= link_to_remote <span class=’button_sprite_star’></span>Save Changes, unsaved_changes = false; $(‘edit_content’).submit();, :class=>save action_button %> I’m using

  • 0
<%= link_to_remote "<span class='button_sprite_star'></span>Save Changes",
    "unsaved_changes = false; $('edit_content').submit();",
    :class=>"save action_button" %>

I’m using remote_form_for (the form works when I click the submit_tag in the form).

The reason why I want to have a different sumbit button, is because of how I’m doing the style of the page. The control buttons are outside the scope of the form.

I know my above method works for regular form_for’s, but when the form is a remote_form_for I get this back:

try {
unsaved_changes = false;
Element.update("content_name_361", "Basic Agressive Pool Theory");
enablePreviewLink();
completeSave();
} catch (e) { alert('RJS error:\n\n' + e.toString()); alert('unsaved_changes = false;\nElement.update(\"content_name_361\", \"Basic Agressive Pool Theory\");\nenablePreviewLink();\ncompleteSave();'); throw e }

which is an AJAX response… but why is that getting sent to a new page instead of the page I was already on?

I’m using ruby 1.8.7 and rails 2.3.8

  • 1 1 Answer
  • 0 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-26T18:57:22+00:00Added an answer on May 26, 2026 at 6:57 pm

    Solved by making it call this function instead of calling the form’s submit:

    ajax_sumbit = function(e){ // e is a jquery object of the form
        $j.ajax({
          type: "POST",
          url: e.attr("action"),
          data: e.serialize()
        });
      }  
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

anyone know of any issues using a link_to_remote to change the state of the
I think this example would make it clear. My HTML is this: <li class='nav-active'><span
Rals 3.0 My question is using link_to_remote to make an ajax call. 2.3.8 Ajax
I want to remove first character from link's text with jQuery. <span class=test1> +123.23
Here is HTML code: <div class=row> <span class=item><a href=#>A</a></span> <span class=item><a href=#>B</a></span> <span class=item><a
I am using Prototype Ajax Updater (via Rails link_to_remote) to insert some HTML returned
I am using formtastic like this class Court < ActiveRecord::Base belongs_to :tournament end class
I have a link_to_remote and I want to make sure people can only click
i have problem use link_to_remote link_to_remote document example say link_to_remote Delete this post, :update
Is it possible to reload a page that was loaded thru link_to_remote? I'm doing

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.