Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Display popup in a right place

Display popup in a right place 10 Monate 5 Tage her #100086

  • aidilo
  • aidilos Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 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..
Letzte Änderung: 10 Monate 5 Tage her von aidilo.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Display popup in a right place 10 Monate 5 Tage her #100089

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 4071
  • Dank erhalten: 748
  • Karma: 341
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.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: aidilo
Moderatoren: ITEd
Ladezeit der Seite: 0.128 Sekunden
Donation Image