Go Back   Forum > OT-Forum > OT - Forum > Fantacalcio

LOGIN

Register FAQ Live Now! Rules Live TV Arcade Search Today's Posts Mark Forums Read






× Notice: This forum is read-only.The content of the community may not be verified or updated. More info
Reply
 
Thread Tools Search this Thread Display Modes Translate
  #1  
Old 06-02-2007, 01:00 PM
taglioecucito taglioecucito is offline
Moderator
 

Join Date: Apr 2006
Posts: 1,442
taglioecucito is on a distinguished road
Send a message via MSN to taglioecucito
Default

Javascript AIUTO !!!!!!!!


Cerco un piccolo aiuto in javascript ..... c'e qualcuno che mastica un pochino di javascript.

Ciao a tutti


Reply With Quote
  #2  
Old 06-02-2007, 01:59 PM
ABNormal ABNormal is offline
Administrator
 
ABNormal's Avatar
 

Join Date: May 2005
Posts: 3,978
ABNormal is on a distinguished road
Send a message via ICQ to ABNormal Send a message via MSN to ABNormal Send a message via Yahoo to ABNormal
Default

Quote:
Originally Posted by taglioecucito
Cerco un piccolo aiuto in javascript ..... c'e qualcuno che mastica un pochino di javascript.

Ciao a tutti


esponi il problema e vadiamo che si può fare..
__________________
«Fino a quando il colore della pelle sarà più importante del colore degli occhi ci sarà sempre la guerra.» Bob Marley


Reply With Quote
  #3  
Old 06-02-2007, 03:29 PM
taglioecucito taglioecucito is offline
Moderator
 

Join Date: Apr 2006
Posts: 1,442
taglioecucito is on a distinguished road
Send a message via MSN to taglioecucito
Default

Code:
<head> <title>New document</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <script type="text/javascript"> function select(id){ for (n = 0; n < 3; n++) { window['ar_'+n]=new Array(); } ar_0[0]=new Option('uno1','uno1') ar_0[1]=new Option('uno2','uno2') ar_0[2]=new Option('uno3','uno3') ar_1[0]=new Option('due1','due1') ar_1[1]=new Option('due2','due2') ar_1[2]=new Option('due3','due3') ar_2[0]=new Option('tre1','tre1') ar_2[1]=new Option('tre2','tre2') ar_2[2]=new Option('tre3','tre3') if(id < "0"){ // Delete all entries in the cities list box for (i = document.form1.division.length; i > 0; i--){ document.form1.division.options[i-1] = null } // Add comment option to City List box document.form1.division.options[0] = new Option("-- Select City --",0) } array_rif=eval("ar_"+id); for(i=0;i<array_rif.length;i++){ document.form1.division.options[i]=array_rif[i] } } </script> </head> <body> <form name="form1"> <select name="season" onChange="select(this[this.selectedIndex].id)"> <option id="-1" value="A">-- Select Season --</option> <option id="0" value="B">2005-2006</option> <option id="1" value="C">2006-2007</option> <option id="2" value="D">2007-2008</option> </select> <select name="division"> <option id="-1" value="E">-- Select Division_2 --</option> </select> <script type="text/javascript"> //select(-1) </script> </body> </html>


Quello che vorrei fare per prima cosa è generare in maniera automatica gli array delle divisioni (ar_uno ar_duo ar_tre) .. prendendo i dati dal database ...

Questo è un esempio ma se volete cambiare il codice del javascript fate pure ...

ciao a tutti

Last edited by taglioecucito : 06-03-2007 at 10:18 AM.


Reply With Quote
  #4  
Old 06-03-2007, 07:35 PM
Ogher Ogher is offline
Amministratore offroad
 
Ogher's Avatar
 

Join Date: Jul 2005
Location: Foam pit
Posts: 1,872
Ogher is on a distinguished road
Send a message via MSN to Ogher
Default

potresti fare uno scriptino php che preleva i dati dal db e li mette in xml; poi con una richiesta asincrona ti vai a prendere quello che ti serve

in settimana provo a scrivere qualcosa
__________________
"Ad Ancelotti glielo dico sempre: 'Immagina se avessi i piedi buoni, non sapremmo dove mettere le coppe...'." G.Gattuso
"Chi vince a Siena ritorna a Siena, chi vince ad Atene va a Tokyo.." C.Pellegatti
"Meglio 1-0 per noi che 1-0 per loro.." C.Pellegatti
Io sono contro l'uso di animazioni al posto del testo su MSN
Non mandatemi messaggi privati con richieste d'aiuto su partite/software, alle partite non rispondo e per i software ci sono i sottoforum dedicati.


Reply With Quote
  #5  
Old 06-04-2007, 12:22 AM
taglioecucito taglioecucito is offline
Moderator
 

Join Date: Apr 2006
Posts: 1,442
taglioecucito is on a distinguished road
Send a message via MSN to taglioecucito
Default

Quote:
Originally Posted by Ogher
potresti fare uno scriptino php che preleva i dati dal db e li mette in xml; poi con una richiesta asincrona ti vai a prendere quello che ti serve

in settimana provo a scrivere qualcosa



Ciao ho trovato qualche info a questo Link vediamo se ci puo essere di aiuto

ciao


Reply With Quote
  #6  
Old 06-08-2007, 02:21 PM
Ogher Ogher is offline
Amministratore offroad
 
Ogher's Avatar
 

Join Date: Jul 2005
Location: Foam pit
Posts: 1,872
Ogher is on a distinguished road
Send a message via MSN to Ogher
Default

spero non sia troppo tardi
ecco qua un esempio funzionante: http://ogher.netsons.org/taglio/
ho messo qualche commento nel codice, in pratica lo script carica quello che serve in base a cosa viene selezionato volendo si può fare in modo che carichi tutto nell' "onload" del body
Attached Files
File Type: zip Archivia.zip (1.2 KB, 94 views)
__________________
"Ad Ancelotti glielo dico sempre: 'Immagina se avessi i piedi buoni, non sapremmo dove mettere le coppe...'." G.Gattuso
"Chi vince a Siena ritorna a Siena, chi vince ad Atene va a Tokyo.." C.Pellegatti
"Meglio 1-0 per noi che 1-0 per loro.." C.Pellegatti
Io sono contro l'uso di animazioni al posto del testo su MSN
Non mandatemi messaggi privati con richieste d'aiuto su partite/software, alle partite non rispondo e per i software ci sono i sottoforum dedicati.

Last edited by Ogher : 06-08-2007 at 02:25 PM.


Reply With Quote
Reply







Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +2. The time now is 06:29 AM.


Powered by: vBulletin Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.