Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. Ruby On Rails - Pass Javascript variable to ajax request

Ruby On Rails - Pass Javascript variable to ajax request

Scheduled Pinned Locked Moved Web Development
rubytutorialjavascriptdatabasehelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ATC
    wrote on last edited by
    #1

    I am trying to pass a javascript variable to part of my ruby ajax request. I have no idea on how to do this...someone please help: example: var myIndex; function setPage(index) { myIndex = index; new Ajax.Request('/myController/save_page_index?index= ** value of myIndex** ',.... } I'm not sure if this is even close. Please help....thanks!!!!

    M 1 Reply Last reply
    0
    • A ATC

      I am trying to pass a javascript variable to part of my ruby ajax request. I have no idea on how to do this...someone please help: example: var myIndex; function setPage(index) { myIndex = index; new Ajax.Request('/myController/save_page_index?index= ** value of myIndex** ',.... } I'm not sure if this is even close. Please help....thanks!!!!

      M Offline
      M Offline
      Michael Sync
      wrote on last edited by
      #2

      You can search about how to use Ajax in Rails. Ruby on rails AJAX[^] If you got the specific error then you come back here and ask it again..

      Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups