Visualizzazione dei risultati da 1 a 5 su 5

Discussione: XStandard lite

  1. #1
    Utente di HTML.it L'avatar di Gio&Ste
    Registrato dal
    Jan 2001
    Messaggi
    643

    XStandard lite

    Ho scaricato Xstandar lite.
    La pagina asp per visualizzare l'editor è la seguente
    codice:
    <script type="text/javascript">
    		//<![CDATA[
    			function myOnSubmitEventHandler() {
    				try {
    					if(typeof(document.getElementById('editor1').EscapeUNICODE) == 'undefined') {
    						throw "Error"
    					} else {
    						document.getElementById('editor1').EscapeUNICODE = true;
    						document.getElementById('xhtml1').value = document.getElementById('editor1').value;
    					}			
    				}
    				catch(er) {
    					document.getElementById('xhtml1').value = document.getElementById('alternate1').value;
    				}
    			}
    		//]]>
    		</script>
    	<body>	
    		<h1>XStandard XHTML 1.1 Editor</h1>
    		
    
    This page will post the data from the editor to itself (this page) and load the received data into the editor.  When the page reloads after you click the Submit button, the data in the editor should look exactly the same as before you clicked the Submit button.</p>
    <table width="600px">
    		<form action="xstandard.asp" method="post" onsubmit="myOnSubmitEventHandler()">
    			
    
    
    				<object classid="clsid:0EED7206-1661-11D7-84A3-00606744831D" id="editor1" width="100%" height="400">
    					<param name="Value" value="<%=Server.HTMLEncode(Request.Form("xhtml1").Item)%>" />
    					<textarea name="alternate1" id="alternate1" cols="60" rows="15"><%=Server.HTMLEncode(Request.Form("xhtml1").Item)%></textarea>
    				</object>
    			</p>
    			
    
    		
    				<input type="hidden" name="xhtml1" id="xhtml1" value="" /> 
    				<input type="submit" id="btnAction" name="btnAction" value="Submit" />
    			</p>
    		</form></table>
    	</body>
    Ho poi fatto in questo modo per salvare il testo in un db
    codice:
    RecSet.AddNew
    	RecSet("alternative1") = Server.HTMLEncode(Request.Form("xhtml1").Item)
    Come devo fare per far stampare il codice corretto?
    E soprattutto sto salvando i dati giusti nel db?
    Giò

  2. #2
    stampare in che senso?

  3. #3
    Utente di HTML.it L'avatar di Gio&Ste
    Registrato dal
    Jan 2001
    Messaggi
    643
    Ho fatto come faccio in genere quando estraggo n record dal db:

    <%=RS("nomecampo")%>

    ma se faccio in questo modo a video mi viene fuori il codice html, che non è proprio quello che mi aspetto di leggere.

    Non so se sono stato chiaro
    Giò

  4. #4
    Gia' provato con

    codice:
    <%=Server.HTMLEncode(rs("campo")).Item)%>
    ?

  5. #5
    Utente di HTML.it L'avatar di Gio&Ste
    Registrato dal
    Jan 2001
    Messaggi
    643
    Uffffffff ho sovrascritto il file e non sto più riuscendo neanche a salvare nel db.
    Giò

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.