SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    May 2007
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    session's value in js

    Hello, is it possible to know the value of a session variable within a javascript file?


    I have session[:language] that contains the selected language and I would like to show some error messages on a javascript file according to the current language so, if I could know the value of session[:language] within the js file the translation was easier.

    Thanks and have a nice day!
    Alla prossima ...

  2. #2
    SitePoint Guru Ruben K.'s Avatar
    Join Date
    Jun 2005
    Location
    Alkmaar, The Netherlands
    Posts
    693
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You'd have to pass the laguage value as a parameter to your javascript methods

  3. #3
    SitePoint Zealot
    Join Date
    May 2007
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks
    Alla prossima ...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •