basta che definisci la funzione che ti serve in un file esterno .JS e lo includi in entrambi gli html
www.gext.it
Regole del Forum