Display popup in a right place

More
3 years 9 months ago - 3 years 9 months ago #100086 by aidilo
aidilo created the topic: Display popup in a right place
Hi..
I have one situation here which I want to display a popup.
For example, at the 2nd page, I have Q1, Q2 and Q3. When i want to go to the next page and if the system cannot save sum of the data into the database, a popup will display before it go to the next page, which is mean bfore it go to the 3rd page. I have created one and put it in Q1. but the result is the popup display before it go to the 2nd page, where actually it should display on the 2nd page. Here im using the script below. Where should i put the script actually to make the popup display in a right place.


if ($("#answer21639X4X134").val() == "") {
alert("Recheck.");
parent.location.href = "http://localhost/123/popup.php";

}

Any help would be appreciated..
Last Edit: 3 years 9 months ago by aidilo.

Please Log in to join the conversation.

More
3 years 9 months ago #100089 by tpartner
tpartner replied the topic: Display popup in a right place
JavaScript can only work on the page where it is placed so if you want an alert on page 2 you will need to put the script there.

You may need to use {INSERTANS} or Expression Manager to access the previous answer(s).

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: aidilo

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now