Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it
    Registrato dal
    Mar 2003
    Messaggi
    393

    window.prompt con Explorer ma non con Mozilla

    Se qualcuno mi può aiutare...mi funziona solo con Explorer, avrei bisogno che mi funzionasse anche con Mozilla...nello specifico con Mozilla non mi apre il prompt di windows...

    codice:
    function addTag(tagName, f) {
    	var txtarea = document.post.textbody;
    	txtarea.focus();
    	theSelection = false;
    	theSelection = document.selection.createRange().text; // Get text selection
    	
    	if (theSelection) {
    		// Add tags around selection
    		document.selection.createRange().text = "<"+tagName+" href=\"http://"+theSelection+"\" target=\"_blank\">"+ theSelection + "</"+tagName+">";
    		txtarea.focus();
    		theSelection = '';
    		return;
    		storeCaret(txtarea);
    	} else {
    		var elem=f.textbody;
     		var what=window.alert("Inserire l'indirizzo del sito da linkare ESCLUSO http:// ");
     		if(what!="undefined") elem.value+=" <"+tagName+" href=\"http://"+what+"\" target=\"_blank\">"+what+"</"+tagName+">";
    	}
    }

  2. #2
    Utente di HTML.it
    Registrato dal
    Mar 2003
    Messaggi
    393

    uppino...

    Nessuno mi sa aiutare?
    Mi rimetto a voi perchè sono abbastanza ignorante in javascript

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.