ciao a tutti ho questa esigenza:
Sto utilizzando in una pagina uno script che gestisce un form con un html editor area, per avere la possibilità di formattare il testo del campo.
Senza utilizate il cgi proposto dovrei poter inviare in una seconda pagina i valori dei campi form per poi salvarli in un databasa access.
allego lo script che gestisce l'html area:
---------------------------
<script type="text/javascript">
// the _editor_url is REQUIRED! don't forget to set it.
_editor_url = "../";
// implicit language will be "en", but let's set it for brevity
_editor_lang = "it";
</script>
<script type="text/javascript" src="../htmlarea.js"></script>
<script type="text/javascript">
// load the plugins that we will use
// loading is necessary ONLY ONCE, regardless on how many editors you create
// basically calling the following functions will load the plugin files as if
// we would have wrote script src="..." but with easier and cleaner code
HTMLArea.loadPlugin("TableOperations");
// this function will get called at body.onload
function initDocument() {
// cache these values as we need to pass it for both editors
var css_plugin_args = {
combos : [
{ label: "Syntax",
// menu text // CSS class
options: { "None" : "",
"Code" : "code",
"String" : "string",
"Comment" : "comment",
"Variable name" : "variable-name",
"Type" : "type",
"Reference" : "reference",
"Preprocessor" : "preprocessor",
"Keyword" : "keyword",
"Function name" : "function-name",
"Html tag" : "html-tag",
"Html italic" : "html-helper-italic",
"Warning" : "warning",
"Html bold" : "html-helper-bold"
},
context: "pre"
},
{ label: "Info",
options: { "None" : "",
"Quote" : "quote",
"Highlight" : "highlight",
"Deprecated" : "deprecated"
}
}
]
};
//---------------------------------------------------------------------
// GENERAL PATTERN
//
// 1. Instantitate an editor object.
// 2. Register plugins (note, it's required to have them loaded).
// 3. Configure any other items in editor.config.
// 4. generate() the editor
//
// The above are steps that you use to create one editor. Nothing new
// so far. In order to create more than one editor, you just have to
// repeat those steps for each of one. Of course, you can register any
// plugins you want (no need to register the same plugins for all
// editors, and to demonstrate that we'll skip the TableOperations
// plugin for the second editor). Just be careful to pass different
// ID-s in the constructor (you don't want to _even try_ to create more
// editors for the same TEXTAREA element ;-)).
//
// So much for the noise, see the action below.
//---------------------------------------------------------------------
//---------------------------------------------------------------------
// CREATE FIRST EDITOR
//
var editor1 = new HTMLArea("titolo");
// plugins must be registered _per editor_. Therefore, we register
// plugins for the first editor here, and we will also do this for the
// second editor.
editor1.registerPlugin(TableOperations);
// custom config must be done per editor. Here we're importing the
// stylesheet used by the CSS plugin.
editor1.config.pageStyle = "@import url(custom.css);";
// generate first editor
editor1.generate();
}, 500);
//---------------------------------------------------------------------
};
HTMLArea.onload = initDocument;
//---------------------------
la gestione del form funziona perfettamente ma la mia action che riporto successivamente, e quindi il relativo request.form per prenedere il valore del campo form mi restituisce un valore nullo.
----------------
<form method="post" action="salva_pagina.asp?" id="edit" name="edit">
--------------
nella pagina salva_pagina.asp
la riga di comando:
primo_testo=request.form("titolo")
nn mi restitusisce nessun valore
il campo chiramante si chiama "titolo"
la procedure senza utilizzare l'assegnazione di questo script x la gestione dell'editor dell'area chiaramnete funziona perfettamente.
grazie e spero di essre riuscito a spiegare il problema