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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:26:44+00:00 2026-05-26T13:26:44+00:00

I have a basic page, with a div containing text, and a form to

  • 0

I have a basic page, with a div containing text, and a form to update that text, on rails 3.1/jquery. I do not know jquery or js well so I’m just poking about with the coffeescript for the controller.

None of the tutorials I’ve found seem be relevant, and the few I’ve found are ancient. I can see what is going on, sort of: I can get an js alert on ajax success, for the form as a remote form (that puts to the server and the update on the controller works — the basic text gets changed, but I need to refresh the page to see the changes).

So I have 2 basic questions I’m working through:

  • Do I need to fiddle with js partials or can I just put this into the js/coffeescript for the page? Seems like this can be handled without a messy bunch of partials.

  • how exactly do you control replacing information with js/jquery: .html, .load, and several other functions seem to be implicated, but I haven’t found the right combo.

All the tutorials I’ve found are either too old or too verbose for a basic hit-the-ground- running understanding of doing some basic jquery stuff within rails. I’m trying to work toward paring down and speeding up form submissions with js/json. A newish, clear, simple tutorial for the uninitiated would be great, but anything pointing me in the right direction of learning would be great.

Yeah, I’ve posted no code yet but if I can this little bit working, I’ll post that.

  • 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-26T13:26:45+00:00Added an answer on May 26, 2026 at 1:26 pm

    Where you have the alert() on ajax success, do something like this:

    $("#myDivId").text(myText);
    

    Where myText is either the text you submitted to the server, or the response from the server – whichever is most appropriate for your situation.

    More generally speaking, to replace the text of an element use $("#myElementId").text("new text"). To replace the HTML of an element use $("#myElementId").html("<b>new HTML</b>")

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a basic CRUD form that uses PageMethods to update the user details,
I have a basic HTML form that gets inserted into a server side div
I have a basic PHP form here that sends an email when submitted: <div
I have a basic search page that replaces html in a div with the
I have a basic form with controls that are databound to an object implementing
I have a basic C# console application that reads a text file (CSV format)
I have coded a simple div containing an image that follows the mouse cursor
Background I have a basic HTML page with an iframe that points to a
We have a simple ColdFusion page that is outputting basic HTML to the browser.
I have a sharebox(div containing social site links) that I've been using with a

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.