window.location on a button not working?

More
5 years 1 week ago #83446 by Melarish
Melarish created the topic: window.location on a button not working?
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>

Please Log in to join the conversation.

More
5 years 6 days ago - 5 years 6 days ago #83451 by Ben_V
Ben_V replied the topic: window.location on a button not working?
Strange... it should work!
Try an alternative way like:
<a href="http://www.musicquotient.com"><button>No, thanks</button></a>

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Last Edit: 5 years 6 days ago by Ben_V.

Please Log in to join the conversation.

More
5 years 6 days ago - 5 years 6 days ago #83484 by Melarish
Melarish replied the topic: window.location on a button not working?
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: 5 years 6 days ago by Melarish.

Please Log in to join the conversation.

More
5 years 6 days ago #83486 by Ben_V
Ben_V replied the topic: window.location on a button not working?
a bit tricky.. I've never seen this kind of issue :(

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)

Please Log in to join the conversation.

Did you already participate in our customer survey?

Don't miss your chance for great prices.

Please click here to participate:

Start now

Start now!

Just create your account and start using Limesurvey today.

Register now