Ciao a tutti facendo una ricerca su google ho trovato questo script:
Questo script serve per inserire link, immagini etc...Codice:function img() { var FoundErrors = ''; var enterURL = prompt("Inserisci l'url dell'immagine:", "http://"); if (!enterURL) { FoundErrors += " " + error_no_url; } if (FoundErrors) { alert("Error!"+FoundErrors); return; } doInsert("[IMG]"+enterURL+"[/IMG]", "", false); } function url() { var FoundErrors = ''; var enterURL = prompt("Inserisci l'url:", "http://"); if (!enterURL) { FoundErrors += " " + error_no_url; } if (FoundErrors) { alert("Error!"+FoundErrors); return; } doInsert(""+enterURL+"", "", false); } function B() { var FoundErrors = ''; var enterURL = prompt("Inserisci il testo da formattare:", "http://"); if (!enterURL) { FoundErrors += " " + error_no_url; } if (FoundErrors) { alert("Error!"+FoundErrors); return; } doInsert(""+enterURL+"", "", false); } function U() { var FoundErrors = ''; var enterURL = prompt("Inserisci il testo da formattare:", "http://"); if (!enterURL) { FoundErrors += " " + error_no_url; } if (FoundErrors) { alert("Error!"+FoundErrors); return; } doInsert(""+enterURL+"", "", false); } function I() { var FoundErrors = ''; var enterURL = prompt("Inserisci il testo da formattare:", "http://"); if (!enterURL) { FoundErrors += " " + error_no_url; } if (FoundErrors) { alert("Error!"+FoundErrors); return; } doInsert(""+enterURL+"", "", false); }
Il problema non sta nel richiamare la funzione ma nell'inserimento(ad esempio) dell'url nella textarea! siccome non sono esperto del javascript mi potreste dare dei consigli?

LinkBack URL
About LinkBacks
