Pagina 3 di 4 primaprima 1 2 3 4 ultimoultimo
Visualizzazione dei risultati da 21 a 30 su 35
  1. #21
    La gentilezza è tua che mi stai aiutando

    Pero' non funziona e in piu' non carica il testo della textarea dentro la Popup.
    Noi NON siamo quì perchè siamo liberi, noi siamo quì perchè NON siamo liberi!

    Neo sta distruggendo le Macchine, quando l'Architetto preme CTRL+ALT+CANC, entra nel Task Manager e termina il processo NEO.EXE. A quel punto Neo scompare e le Macchine distruggono Zion...

  2. #22
    CHiariamo...




    <%
    sTableName = request.querystring("table")
    strName = request.querystring("name")
    sWhere = request.querystring("where")
    cid = request.querystring("cid")

    OpenRS arrConn(cid)

    verifica questa query e fammi sapere dove sta il recordset

    sSQL = "SELECT [" & strName & "] FROM [" & sTableName & "]" & sWhere & ";"

    rs.Open sSQL, , , adCmdTable


    for each fld in rs.fields

    fldVal = fld.value

    next
    %>


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>


    <script language="JavaScript" src="yusasp_ace.js"></script>
    <script language="JavaScript" src="yusasp_color.js"></script>

    <script>
    //STEP 10: prepare submit FORM function
    Controlla i punto e virgola
    function SubmitForm()
    {
    //STEP 11: Before getting the edited content, the display mode of the editor
    //must not in HTML view.
    if(obj1.displayMode == "HTML")
    {
    alert("Please uncheck HTML view");
    return ;
    }

    //STEP 12: Here we move the edited content into the input form we've prepared before.

    Frm.body.value = obj1.getContentBody();

    //opener.document.frm.Body.value=Form1.txtContent.va lue;
    //window.close()


    //STEP 13: Form submit.
    Form1.submit();
    window.close();
    }

    function LoadContent()
    {
    //STEP 6: Use putContent() method to to put the hidden Textarea value into the editor.
    obj1.putContent(idTextarea.value)
    }

    </script>
    </head>

    <!-- STEP 5: After this page is fully loaded (means that the content from the database is ready in the textarea)
    then we have to copy the content from the textarea into the editor. We do this on event body onload, by call a function named LoadContent() -->
    <body onload="LoadContent()" style="font:10pt verdana,arial,sans-serif">



    <form method="post" name="Form1" ID="Form1">

    <!-- STEP 8: Since we edit content within editor that is not part of the FORM,
    we need to move the edited content into an input FORM.
    Here we prepare a hidden form field. -->

    cos'è strName e dove viene creato?

    <input type="hidden" name="txtContent" value="<%=strName%>" ID="Hidden1">



    <script>
    var obj1 = new ACEditor("obj1")
    obj1.width = "100%" //editor width
    obj1.height = 300 //editor height
    obj1.AssetPageURL = "default_Asset.asp" //specify Asset library management page
    obj1.ImagePageURL = "default_image.asp" //specify Image library management page
    obj1.base = "127.0.0.1/net/file/" //where the users see the content (where we publish the content)
    obj1.baseEditor = "127.0.0.1/net/file/" //location of the editor
    obj1.StyleSelection = "ace_styleselection.css"; //use style selection
    obj1.StyleSelectionPath_RelativeTo_EditorPath = "../style/"; //location of style selection css file (relative to the editor)
    obj1.PageStyle = "ace_document.css"; //apply external css to the document
    obj1.PageStylePath_RelativeTo_EditorPath = "../style/"; //location of the external css (relative to the editor)
    obj1.isFullHTML = false //edit full HTML (not just BODY)s
    obj1.RUN() //show

    </script>




    <INPUT type="button" value="S A V E" onclick="SubmitForm()" ID="Button1" NAME="Button1">

    </form>


    <!-- STEP 4: Put the content (from the database)
    into a hidden textarea. -->
    <TEXTAREA rows=7 cols=40 ID="idTextarea" NAME="idTextarea" style="display:none">
    <%=fldVal%>
    </TEXTAREA>

    </body>
    </html>

    Poi fai sapere...
    Metalgalle

    La distanza tra follia e genio si misura solo col successo.

    La sorte favorisce la mente preparata.

  3. #23
    - cos'è strName e dove viene creato?
    strName è il nome del campo della TEXTAREA e lo ricavo tramite queystring in ASP così

    strName = request.querystring("name")

    questo perchè ogni textarea ha un nome diverso e quindi viene fuori dinamicamente.


    - Il recordset viene creato quì

    codice:
    for each fld in rs.fields 
    
    fldVal = fld.value 
    
    next
    Noi NON siamo quì perchè siamo liberi, noi siamo quì perchè NON siamo liberi!

    Neo sta distruggendo le Macchine, quando l'Architetto preme CTRL+ALT+CANC, entra nel Task Manager e termina il processo NEO.EXE. A quel punto Neo scompare e le Macchine distruggono Zion...

  4. #24
    Ok adesso nella popup compare il testo da modificare, ma quando clicco su SAVE non succede nulla. Questo secondo me perchè vi è un form senza Action.

    .... ....
    Noi NON siamo quì perchè siamo liberi, noi siamo quì perchè NON siamo liberi!

    Neo sta distruggendo le Macchine, quando l'Architetto preme CTRL+ALT+CANC, entra nel Task Manager e termina il processo NEO.EXE. A quel punto Neo scompare e le Macchine distruggono Zion...

  5. #25
    Scusa un attimo, ma se i dati che ti interessano vanno nella textarea, a cosa serve questo elemento hidden?

    <input type="hidden" name="txtContent" value="<%=strName%>" ID="Hidden1">

    Poi, hai controllato i punti e virgole della function, e la query che richiami in testa?
    Sono noioso, ma sembra che nella query manchi l'enunciato WHERE, e nella function sembrano mancare diversi terminatori...
    Metalgalle

    La distanza tra follia e genio si misura solo col successo.

    La sorte favorisce la mente preparata.

  6. #26
    Altro dubbio: xkè i numeri degli step sono palesemente in ordine errato?
    Metalgalle

    La distanza tra follia e genio si misura solo col successo.

    La sorte favorisce la mente preparata.

  7. #27
    L'hidden non lo so a cosa serve, era già li, la select l'ho messa io e non serve la where perchè i dati me li tira fori giusti e li prende dalla giusta area, almeno questo so che è giusto.

    Gli step erano li anche quelli.

    Adesso ho fatto una funzioncina SAVE() e finalmente la popup si chiude premendo save e mi inserisce uno spazio nella textarea, ma non il contenuto modificato, adesso non rimane altro che fargli sputare il contenuto giusto della popup nella TEXTAREA.

    ho fatto così:

    codice:
    ....
    ....
    ....
    function save() 
    {
    window.opener.frm("<%=strName%>").value = idTextarea.value;
    window.close();
    }
    ed ho eliminato il form ovvero questo

    codice:
    <form method="post" name="Form1" ID="Form1">
    il sorgente completo della pagina con la mia modifica è questo

    LINK
    Noi NON siamo quì perchè siamo liberi, noi siamo quì perchè NON siamo liberi!

    Neo sta distruggendo le Macchine, quando l'Architetto preme CTRL+ALT+CANC, entra nel Task Manager e termina il processo NEO.EXE. A quel punto Neo scompare e le Macchine distruggono Zion...

  8. #28
    Ulteriore revisione...

    codice:
    
    
    <%
    	sTableName =  request.querystring("table")
    	strName =  request.querystring("name")
    	sWhere =  request.querystring("where")
    	cid =  request.querystring("cid")
    	OpenRS arrConn(cid)
    	sSQL = "SELECT [" & strName & "] FROM [" & sTableName & "]" & sWhere & ";"
    	rs.Open sSQL, , , adCmdTable
    	for each fld in rs.fields
    		fldVal = fld.value
    	next
    %>
    
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    
    
    <script language="JavaScript" src="yusasp_ace.js"></script>
    <script language="JavaScript" src="yusasp_color.js"></script>
    
    <script>
    	var obj1 = new ACEditor("obj1") 
    	obj1.width = "100%" //editor width
    	obj1.height = 300 //editor height
    	obj1.AssetPageURL = "default_Asset.asp" //specify Asset library management page
    	obj1.ImagePageURL = "default_image.asp" //specify Image library management page
    	obj1.base = "127.0.0.1/net/file/" //where the users see the content (where we publish the content)
    	obj1.baseEditor = "127.0.0.1/net/file/" //location of the editor
    	obj1.StyleSelection = "ace_styleselection.css"; //use style selection
    	obj1.StyleSelectionPath_RelativeTo_EditorPath = "../style/"; //location of style selection css file (relative to the editor)
    	obj1.PageStyle = "ace_document.css"; //apply external css to the document
    	obj1.PageStylePath_RelativeTo_EditorPath = "../style/"; //location of the external css (relative to the editor)
    	obj1.isFullHTML = false //edit full HTML (not just BODY)s
    	obj1.RUN() //show
    	function LoadContent(){
    		//STEP 6: Use putContent() method to to put the hidden Textarea value into the editor.
    		obj1.putContent(idTextarea.value) 
    	}
    	//STEP 10: prepare submit FORM function
    	function SubmitForm(){
    		//STEP 11: Before getting the edited content, the display mode of the editor 
    		//must not in HTML view.
    		if(obj1.displayMode == "HTML"){
    			alert("Please uncheck HTML view");
    			return ;
    		}
    	//STEP 12: Here we move the edited content into the input form we've prepared before.
    	Frm.body.value = obj1.getContentBody()
    	//STEP 13: Form submit.
    	Form1.submit();
    	window.close();
    	}
    </script>
    </head>
    <!-- STEP 5: After this page is fully loaded (means that the content from the database is ready in the textarea) 
    then we have to copy the content from the textarea into the editor. We do this on event body onload, by call a function named LoadContent() -->
    <body onload="LoadContent()" style="font:10pt verdana,arial,sans-serif">
    
    <form method="post" action="????"  name="SaveForm" ID="Form1">
    	
    	<INPUT type="button" value="S A V E" onclick="SubmitForm()" ID="Button1" NAME="Button1">
    	
    	<TEXTAREA rows=7 cols=40 ID="idTextarea" NAME="idTextarea" style="display:none">
    		<%=fldVal%>
    	</TEXTAREA>
    </form>
    </body>
    </html>
    Metalgalle

    La distanza tra follia e genio si misura solo col successo.

    La sorte favorisce la mente preparata.

  9. #29
    Con la tua nuova revisione ne carica il contenuto della TEXTAREA ne fa nulla se clicco SAVE.... hai visto la mia modifica? è online.
    Noi NON siamo quì perchè siamo liberi, noi siamo quì perchè NON siamo liberi!

    Neo sta distruggendo le Macchine, quando l'Architetto preme CTRL+ALT+CANC, entra nel Task Manager e termina il processo NEO.EXE. A quel punto Neo scompare e le Macchine distruggono Zion...

  10. #30
    Mi sa che prima ho toppato... xò ho rivisto la tua nuova versione...

    codice:
     
     
    <% 
    	sTableName = request.querystring("table") 
    	strName = request.querystring("name") 
    	sWhere = request.querystring("where") 
    	cid = request.querystring("cid") 
    	OpenRS arrConn(cid) 
    	sSQL = "SELECT [" & strName & "] FROM [" & sTableName & "]" & sWhere & ";" 
    	rs.Open sSQL, , , adCmdTable 
    	for each fld in rs.fields 
    		fldVal = fld.value 
    	next 
    %> 
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 
    <html> 
    <head> 
     
    <script language="JavaScript" src="yusasp_ace.js"></script> 
    <script language="JavaScript" src="yusasp_color.js"></script> 
    <script> 
    	//STEP 10: prepare submit FORM function 
    	function SubmitForm() { 
    		//STEP 11: Before getting the edited content, the display mode of the editor 
    		//must not in HTML view. 
    		if(obj1.displayMode == "HTML") { 
    			alert("Please uncheck HTML view"); 
    			return ; 
    		} 
    		//STEP 12: Here we move the edited content into the input form we've prepared before.
    		Frm.body.value = obj1.getContentBody(); 
    		//opener.document.frm.Body.value=Form1.txtContent.value; 
    		//window.close() 
    		//STEP 13: Form submit.
    		//window.opener.frm("<%=strName%>").value = this.Content.value;
    		window.close();
    	}
    	function LoadContent() { 
    		//STEP 6: Use putContent() method to to put the hidden Textarea value into the editor. 
    		obj1.putContent(idTextarea.value) 
    	} 
    	function save() {
    		window.opener.frm("<%=strName%>").value = idTextarea.value;
    		window.close();
    	} 
    </script> 
    </head> 
    <!-- STEP 5: After this page is fully loaded (means that the content from the database is ready in the textarea) 
    then we have to copy the content from the textarea into the editor. We do this on event body onload, by call a function named LoadContent() --> 
    <body onload="LoadContent()" style="font:10pt verdana,arial,sans-serif"> 
     
    <form method="post" name="Form1" ID="Form1">
    	<!-- STEP 8: Since we edit content within editor that is not part of the FORM, 
    	we need to move the edited content into an input FORM. 
    	Here we prepare a hidden form field. --> 
    	<input type="hidden" name="txtContent" value="<%=strName%>" ID="Hidden1"> 
    	 
    	<script> 
    		var obj1 = new ACEditor("obj1") 
    		obj1.width = "100%" //editor width 
    		obj1.height = 300 //editor height 
    		obj1.AssetPageURL = "default_Asset.asp" //specify Asset library management page 
    		obj1.ImagePageURL = "default_image.asp" //specify Image library management page 
    		obj1.base = "127.0.0.1/net/file/" //where the users see the content (where we publish the content) 
    		obj1.baseEditor = "127.0.0.1/net/file/" //location of the editor 
    		obj1.StyleSelection = "ace_styleselection.css"; //use style selection 
    		obj1. StyleSelectionPath_RelativeTo_EditorPath
    		= "../style/"; //location of style selection css file (relative to the editor) 
    		obj1.PageStyle = "ace_document.css"; //apply external css to the document 
    		obj1.PageStylePath_RelativeTo_EditorPath = "../style/"; //location of the external css (relative to the editor) 
    		obj1.isFullHTML = false //edit full HTML (not just BODY)s 
    		obj1.RUN() //show 
    	</script> 
    	 
    	<INPUT type="submit" value="S A V E" onclick="save()" ID="Button1" NAME="Button1"> 
    	<!-- STEP 4: Put the content (from the database) 
    	into a hidden textarea. --> 
    	<TEXTAREA rows=7 cols=40 ID="idTextarea" NAME="idTextarea" style="display:none"> 
    		<%=fldVal%> 
    	</TEXTAREA> 
    </form> 
    </body> 
    </html>
    Metalgalle

    La distanza tra follia e genio si misura solo col successo.

    La sorte favorisce la mente preparata.

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.