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

  • Home
  • SEARCH
  • 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 946009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:50:48+00:00 2026-05-15T22:50:48+00:00

Okay I have an extensive ruby application running behind Ruby on Rails right now.

  • 0

Okay I have an extensive ruby application running behind Ruby on Rails right now. This application needs form input but I don’t want to refresh the page when I update the text box. What I mean is:

I have a form that has two text boxes, one is called “starttime” and one is called “endtime”. I somehow need to get the value of these text boxes (what a user has typed in) into ruby when a button is pressed. Is there some sort of equivalent to javascript’s document.form.starttime.value command but for ruby? Or is there some way to submit the form data, retrieve it, but not refresh the page such as using ajax? I know ajax is used to manipulate the DOM dynamically without refreshing the page, but I really just need to retrieve data. Any help would be greatly appreciated, I simply cannot find this anywhere.

  • 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-15T22:50:49+00:00Added an answer on May 15, 2026 at 10:50 pm

    You can do this quite easily with jQuery. Give the start time and end time form elements a distinct ID (I use startDate and endDate below) and you can easily retrieve them, then send the data to a Rails action that can process them in the background and if necessary, update the DOM with any relevant data when you click on a button (below assumes an input button with the ID SendDateValues).

    Something like this: (Not tested)

    <script type="text/javascript">
    //<![CDATA[
    
    $("#SendDateValues").click(function() {
      $.ajax({
        url: '/SomeController/ProcessDateData/",
        data: 'startDate=' + $("#startdate").val() + "&endDate=" + $("#endDate").val(),
        success: function(html) { //DO SOMETHING WITH THE RESULT },
        type: 'post'
      });
    });
    
    //]]>$
    </script>
    

    Play with the results… Use Firebug or something similar to check what gets passed. Check your Rails event log to see what data your action gets.

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

Sidebar

Ask A Question

Stats

  • Questions 509k
  • Answers 509k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You may want to look at Mono Cairo: http://www.mono-project.com/Mono.Cairo May 16, 2026 at 4:32 pm
  • Editorial Team
    Editorial Team added an answer To fix this you have to manually delete any bin… May 16, 2026 at 4:32 pm
  • Editorial Team
    Editorial Team added an answer When this XML document is open on browser: <?xml-stylesheet type="text/xsl"… May 16, 2026 at 4:32 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Okay. I have this code on my site: <?php session_start(); include database.php; include bruger.php;
Okay so I have two import pieces of code involved in this. This first
Okay, if I have a html document that looks a bit like this: <div
okay i have found the way to run a video in a image.... the
Okay I have my csv builder essentially working. it has 3 columns. Name, Position,
Okay, I have a function which reads a xml file and creates controls using
Okay so I have two png files, a circle and a maze. Basically the
Okay, so I have a snippet of code from a website containing a button:
I have a choice. I have a number of already ordered strings that I
I'm writing a Java Tree in which tree nodes could have children that take

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.