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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:37:24+00:00 2026-05-27T02:37:24+00:00

I’am trying to use a jQuery slider in a Lift based application and I

  • 0

I’am trying to use a jQuery slider in a Lift based application and I don’t know how to get back the data from user’s actions. Which means, if the user slides the slider on the webpage, I want to be able to use the data on server’s side. So I want to import that data as a lift value or anything useful.

The following code is inspired from http://jqueryui.com/demos/slider/#range

Here is my (simplified) html page :

<div id="searchMenu" class="lift:surround?with=default;at=content">
<form class="lift:FormSearch?form=post"> 
    <script id="sliderScript"> </script>
    <h3>Search</h3>

    <div id="range-slider"></div>

    <input name="search" type="submit" value="Submit"/>
</form>
</div>

Here is my (also a lot simplified) scala file

object FormSearch {

  def render = {
     val script = "$(function() {"+
       "$(\"#range-slider\").slider({ "+
       "range: true, "+
       "min: 0,"+
       "max: 500,"+
       "values: [75,300],"+ 
     "});"
     //binding
     "#sliderScript *" #> script &
     ".ui-slider-handle [onclick]" #> SHtml.ajaxInvoke( () => println("event_")) 
  }

As you can see, in the last line of my scala file, I tried to catch an event on slider buttons but it doesn’t work.
So I would like to know if there is a simple method to use jQuery inputs on server’s side.

Thanks is advance

PS: it is my first post, sorry if it is not well formated.

  • 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-27T02:37:25+00:00Added an answer on May 27, 2026 at 2:37 am

    Ok I found the perfect solution to my problem so I will share it with you :

    Here is my (simplified) html page :

    <div id="searchMenu" class="lift:surround?with=default;at=content">
        <form class="lift:FormSearch?form=post"> 
            <script id="sliderScript"> </script>
            <h3>Search</h3>
            <div id="range-slider"></div>
            <input name="f:slider" style="display: none" value=""/>
            <input name="search" type="submit" value="Submit"/>
         </form>
    </div>
    

    And her is my (simplified) scala code

    object FormSearch {
      def render = {
        val script = "$(function() {"+
          "$(\"#range-slider\").slider({ "+
          "range: true, "+
          "min: 0,"+
          "max: 500,"+
          "values: [75,300],"+
          ", slide: function(event, ui) { " +
            "document.getElementById('slider').value = value;" +
          "}"+ 
        "});"
        val slider = ""
        // binding
        "#sliderScript *" #> script &
        "name=f:slider" #> SHtml.text(slider, println(_), "id" -> "slider")
      }
    }
    

    So now, my piece of jQuery code is treated exactly as a text form input. So I can use it the same way as other form stuff including request variables.
    I hope this solution will help other people.

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I am currently running into a problem where an element is coming back from
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the

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.