Forum Discussion

dhiraj_gophane's avatar
11 years ago

can we use javascript in mobile header?

Hi,

I want to fetch host url for current logged in user using javascript "window.location.host".

can I use it in mobile header in skin wrapper?

I'm trying but its not working.

is there any specific approach for it?

 

4 Replies

  • NicoB's avatar
    NicoB
    Lithium Alumni (Retired)
    11 years ago
    Hi,
    you can definitely do that.
    Only make sure to embed the JS code in the right skin.
    We provide two skin wrappers, one for desktop and one for mobile.
    Are you putting the JS code in the right wrapper?
    Did you try to see whether you are getting and JS error in the console?
    Thanks,
    Nico
  • I've put the code in mobile wrapper in header..
    but its not taking the code inside <@liaAddScript>

  • NicoB's avatar
    NicoB
    Lithium Alumni (Retired)
    11 years ago
    Well done!!
    Sorry.. I didn't have time to come back to you :)