Welcome, Guest
Username: Password: Remember me

TOPIC: window.location on a button not working?

window.location on a button not working? 1 year 9 months ago #83446

  • Melarish
  • Melarish's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 15
  • Karma: 0
I'm trying to add buttons at the end of the survey to redirect the user to one of two pages. However, both of them redirect to /limesurvey/index.php for some reason. Am I doing something wrong?
<button onclick="window.location='http://www.musicquotient.com'">No, thanks</button>
The administrator has disabled public write access.

Re: window.location on a button not working? 1 year 9 months ago #83451

  • Ben_V
  • Ben_V's Avatar
  • OFFLINE
  • Platinum Lime
  • Posts: 933
  • Thank you received: 193
  • Karma: 62
Strange... it should work!
Try an alternative way like:
<a href="http://www.musicquotient.com"><button>No, thanks</button></a>
Benoît

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
Last Edit: 1 year 9 months ago by Ben_V.
The administrator has disabled public write access.

Re: window.location on a button not working? 1 year 9 months ago #83484

  • Melarish
  • Melarish's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 15
  • Karma: 0
Still the same result - goes to index.php :(

Is there any setting anywhere that could prevent external links? I checked general settings but nothing like that there.
Last Edit: 1 year 9 months ago by Melarish.
The administrator has disabled public write access.

Re: window.location on a button not working? 1 year 9 months ago #83486

  • Ben_V
  • Ben_V's Avatar
  • OFFLINE
  • Platinum Lime
  • Posts: 933
  • Thank you received: 193
  • Karma: 62
a bit tricky.. I've never seen this kind of issue :(
Benoît

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.146 seconds
Donation Image