Sto cercando uno script molto semplice, ma non posso eseguire JavaScript Ho dimenticato qualcosa nel chronoform configurazione (ho disattivato il plugin jquery ma non funziona lo stesso) qualcuno può aiutarmi a capire! Con la versione per Joomla 1.0 non ho mai avuto alcun problema! Grazie
I'm trying a very simple script but I can not run javascript I forgot something in the configuration chronoform (I disabled the plugin but jquery does not work the same) can anyone help me understand! With the version for joomla 1.0 I never had any problem! Thanks
html
javascript
				
				
				
			I'm trying a very simple script but I can not run javascript I forgot something in the configuration chronoform (I disabled the plugin but jquery does not work the same) can anyone help me understand! With the version for joomla 1.0 I never had any problem! Thanks
html
<a href="javascript:visualizza('quote')">
<img src=../images/sel+.gif border="0" src="../images/sel-.gif" width="14" height="13" alt="ESPANDI"> </ a> </ td> </ div>javascript
funzione visualizza (id) (
if (document.getElementById) (
if (document.getElementById (id). style.display == 'none') (
document.getElementById (id). style.display = 'block';
Else ()
document.getElementById (id). style.display = 'none';
)
)
)
					Hi lilla67,
There may be other problems but the first one I see is that I believe that JavaScript doesn't speak Italian and so
Bob
				
				
				
			There may be other problems but the first one I see is that I believe that JavaScript doesn't speak Italian and so
funzione visualizza (id) (function visualizza (id) (Bob
					Hi lilla67 & Bob,
Add to that, you need {} rather than () for the function body:
Might also be wize to add a check that the document.getElementById() method actually returns a valid object (not null)...
/Fredrik
				
				
				
			Add to that, you need {} rather than () for the function body:
function visualizza(id) {
  if (document.getElementById(id).style.display == 'none') {
    document.getElementById(id).style.display = 'block';
  } else {
    document.getElementById(id).style.display = 'none';
  }
}Might also be wize to add a check that the document.getElementById() method actually returns a valid object (not null)...
/Fredrik
					My mistake to make copy and paste the code after the translation, the javascript code I use is this
function visualizza(id)(
if (document.getElementById){
if(document.getElementById(id).style.display == 'none'){
document.getElementById(id).style.display = 'block';
} else {
document.getElementById(id).style.display = 'none';
}
}
)
There is a working example that I can use to see if where is my problem, if javascript or other
thanks
				
				
				
			function visualizza(id)(
if (document.getElementById){
if(document.getElementById(id).style.display == 'none'){
document.getElementById(id).style.display = 'block';
} else {
document.getElementById(id).style.display = 'none';
}
}
)
There is a working example that I can use to see if where is my problem, if javascript or other
thanks
					Hi lilla67,
You still got some ( and ) in there in the wrong places...
/Fredrik
				
				
				
			You still got some ( and ) in there in the wrong places...
function visualizza(id) {
  if (document.getElementById) {
    if(document.getElementById(id).style.display == 'none') {
      document.getElementById(id).style.display = 'block';
    } else {
      document.getElementById(id).style.display = 'none';
    }
  }
}/Fredrik
function showhide() {
   var test = document.getElementById('categoria').value;
   if (test == 'Escort') {
         document.getElementById('escort').style.display='block';
   }
   else { document.getElementById('escort').style.display='none'; }
   
 if (test == 'Girl') {
         document.getElementById('girl').style.display='block';
   }
   else { document.getElementById('girl').style.display='none'; }
   
    if (test == 'Boy') {
         document.getElementById('boy').style.display='block';
   }
   else { document.getElementById('boy').style.display='none'; }
   
    if (test == 'Trans') {
         document.getElementById('trans').style.display='block';
   }
   else { document.getElementById('trans').style.display='none'; }
   
    if (test == 'Mistress') {
         document.getElementById('mistress').style.display='block';
   }
   else { document.getElementById('mistress').style.display='none'; }
   
    if (test == 'Coppie') {
         document.getElementById('coppie').style.display='block';
   }
   else { document.getElementById('coppie').style.display='none'; }
   }Ok for the Javascript code I solved the problem that now works is that there was not email the contents of a hidden div.
What should I do
Help
This topic is locked and no more replies can be posted.
		
	
 
  