Welcome, Guest
Username: Password: Remember me

TOPIC: Display popup in a right place

Display popup in a right place 1 year 1 week ago #100086

  • aidilo
  • aidilo's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 1
  • Karma: 0
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: 1 year 1 week ago by aidilo.
The administrator has disabled public write access.

Display popup in a right place 1 year 1 week ago #100089

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4210
  • Thank you received: 792
  • Karma: 360
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
The following user(s) said Thank You: aidilo
Moderators: ITEd
Time to create page: 0.095 seconds
Donation Image