Click here to Skip to main content
15,885,309 members
Home / Discussions / JavaScript
   

JavaScript

 
Generalguidence for the begginners Pin
Kshitiz Thapa2-Nov-18 3:16
Kshitiz Thapa2-Nov-18 3:16 
GeneralRe: guidence for the begginners Pin
Richard MacCutchan2-Nov-18 4:00
mveRichard MacCutchan2-Nov-18 4:00 
SuggestionRe: guidence for the begginners Pin
CHill6015-Nov-18 21:46
mveCHill6015-Nov-18 21:46 
QuestionLoops Pin
Member 1403490227-Oct-18 5:06
Member 1403490227-Oct-18 5:06 
AnswerRe: Loops Pin
Richard MacCutchan27-Oct-18 5:54
mveRichard MacCutchan27-Oct-18 5:54 
QuestionSTOP VALIDATION Pin
Member 1344978425-Oct-18 0:44
Member 1344978425-Oct-18 0:44 
AnswerRe: STOP VALIDATION Pin
Afzaal Ahmad Zeeshan25-Oct-18 2:40
professionalAfzaal Ahmad Zeeshan25-Oct-18 2:40 
Questionno me funciona funcion autocomplete Jquery Pin
serenimus20-Oct-18 8:53
serenimus20-Oct-18 8:53 
Hola!
es mi primer mensaje en el foro..no encontré subforo de jquery,pero espero que sea el sitio adecuado

Estoy desarrollando un proyecto con PHP en Zend Framework, y en una vista recojo los datos de nuevo cliente con el típico formulario.

hay que introducir (en textbox) 1º Comunidad y 2º Provincia..la idea es que si el usuario teclea "Galicia" en el siguiente textbox se muestren sus provincias...

el caso es que el primer autocomplete funciona, pero el segundo, no y no se que estoy haciendo mal, no me da error el debuger de Chrome, he probado en Firefox, y tampoco..agradecería algo de ayuda

Dejo un copy paste de codigo..gracias por anticipado Smile | :)

<html>
	<head>
		<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
		<!--<link rel="stylesheet" href="/resources/demos/style.css">-->
		<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
		<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
	</head>

<script type="text/javascript">
		
		
		 $(document).ready(function(){
			 
		  var comunidades=[				
			  "Galicia",			  
			  "Asturias",
			  "Cantabria",
			  "Euskadi",
			  "Navarra",
			  "Cataluña",
			  "Comunidad Valenciana",
			  "Murcia",
			  "Andalucia",
			  "Canarias",
			  "Baleares"     
			  ];
			  
			    var provingal=[
				"La Coruña",
				"Lugo",
				"Orense",
				"Pontevedra"
				];
			  

			  /*esta parte funciona..el textbox se llena con los resultados*/
			  $("#comu").keyup(function(){
				
				  $(this).autocomplete({
					  source:comunidades
				  });
				  
			  });
			  
			  
			  
			  $("#provin").keyup(function(){

				  var comu=document.getElementById("comu").value;
				 
                                  /*el debug llega al switch,pero autocomplete no funciona aqui*/

				  switch(comu)
				  {
					  case"Galicia":
						$(this).autocomplete({
							source:provingal
						}); 
						
						break;
				  }
			  });
			  
						  
			}); 

AnswerRe: no me funciona funcion autocomplete Jquery Pin
Nelek20-Oct-18 8:59
protectorNelek20-Oct-18 8:59 
QuestionMap JSON data file with dates and multiple string value pairs to Angular/Chart.js Pin
Member 1201357914-Oct-18 22:08
Member 1201357914-Oct-18 22:08 
Questionaspx file don't open in chrome Pin
anasr200010-Oct-18 2:22
professionalanasr200010-Oct-18 2:22 
Questiontest regexep javascript Pin
Alboyz5-Oct-18 4:31
Alboyz5-Oct-18 4:31 
AnswerRe: test regexep javascript Pin
Richard Deeming5-Oct-18 4:48
mveRichard Deeming5-Oct-18 4:48 
GeneralRe: test regexep javascript Pin
Alboyz5-Oct-18 5:02
Alboyz5-Oct-18 5:02 
GeneralRe: test regexep javascript Pin
uxotucung9-Nov-18 3:09
uxotucung9-Nov-18 3:09 
QuestionAdding a list of files to the array and displaying them in the component Pin
Member 140077214-Oct-18 4:33
Member 140077214-Oct-18 4:33 
QuestionDate picker style not showing Pin
thepast24-Sep-18 8:21
thepast24-Sep-18 8:21 
AnswerRe: Date picker style not showing Pin
ZurdoDev24-Sep-18 8:58
professionalZurdoDev24-Sep-18 8:58 
GeneralRe: Date picker style not showing Pin
Iniciativa Box Funcional25-Sep-18 7:36
Iniciativa Box Funcional25-Sep-18 7:36 
QuestionRelation between null and zero. Pin
GKP199222-Sep-18 21:21
professionalGKP199222-Sep-18 21:21 
AnswerRe: Relation between null and zero. Pin
Richard Deeming24-Sep-18 8:03
mveRichard Deeming24-Sep-18 8:03 
GeneralRe: Relation between null and zero. Pin
GKP199224-Sep-18 17:37
professionalGKP199224-Sep-18 17:37 
QuestionTypeScript, Dropping Image and loading preview without posting, a working sample, FileReader, readAsDataUrl, reader.result Pin
jkirkerx19-Sep-18 7:55
professionaljkirkerx19-Sep-18 7:55 
QuestionCan't match this string in typescript using if and else if Pin
jkirkerx18-Sep-18 13:04
professionaljkirkerx18-Sep-18 13:04 
AnswerRe: Can't match this string in typescript using if and else if Pin
Graham Breach18-Sep-18 21:21
Graham Breach18-Sep-18 21:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.