Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Implement "AJAX"-call

Implement "AJAX"-call 1 Jahr 11 Monate her #95327

  • king_and1
  • king_and1s Avatar
  • Junior Lime
  • Beiträge: 29
  • Karma: 0
Well , so i got the Blue and Gray template where i changed some colors and so on....

The structure still the same.

The first question in my Survey is like : "please type in your serial number"

Well, and thats exactly where i want an Ajax call. After the user finished the input, it should start checking the serial number on a external server and provide an answer if this serial is correct or not .
I´ve searched the question.pstpl(dunno how its correct..) and i´ve found the div_class="answers" and the table´s in it. But i dont know how to specifically target this first question. So i hope this is enough information so we can go on working out this problem , if not please tell me what´s missing and i´m gonna try editing it as good as possible...
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Implement "AJAX"-call 1 Jahr 11 Monate her #95334

  • tpartner
  • tpartners Avatar
  • LimeSurvey Team
  • Beiträge: 4632
  • Dank erhalten: 925
  • Karma: 408
I've moved this post to a more appropriate category. And, please don't cross post.

You would place the JavaScript for the AJAX call in the source of the question. See - manual.limesurvey.org/Workarounds:_Manip....29_in_LimeSurvey.3F

So, if you are using the jQuery get() function, the JS would look something like:
<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
		var qID = {QID};
		$('#question'+qID+' input[type="text"]').change(function(){
			$.get('http://somedomain.com/customScript.php', { serial: $('#question'+qID+' input[type="text"]').val() } );

Unfortunately, I can't help you with the PHP coding.
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.
Moderatoren: ITEd
Ladezeit der Seite: 0.130 Sekunden
Donation Image