Bienvenue, Invité
Nom d'utilisateur : Mot de passe : Se souvenir de moi

SUJET : Display popup in a right place

Display popup in a right place il y a 1 an 2 mois #100086

  • aidilo
  • Portrait de aidilo
  • Hors ligne
  • Fresh Lemon
  • Messages : 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..
Dernière édition: il y a 1 an 2 mois par aidilo.
L'administrateur a désactivé l'accès en écriture pour le public.

Display popup in a right place il y a 1 an 2 mois #100089

  • tpartner
  • Portrait de tpartner
  • En ligne
  • LimeSurvey Team
  • Messages : 4363
  • Remerciements reçus 827
  • Karma: 381
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.
L'administrateur a désactivé l'accès en écriture pour le public.
Cet utilisateur a été remercié pour son message par: aidilo
Modérateurs: ITEd
Temps de génération de la page : 0.128 secondes
Donation Image