A
andre.roberge
I'm using a js script (approx. 300 lines) from someone else to create
dynamically some web pages, using Python. Unfortunately, I am not
familiar with javascript :-(
I now want to reproduce the same functionality given by the script at
multiple points in the page. Basically, the script goes like this
/* whole bunch of functions with things in them like
input.value
input.focus()
input.selectionEnd
*/
At the very end, I have
function init() {
input = document.getElementById("input");
}
with the appropriate html code (with id="input") appearing on the web
page.
One obvious way to do it is to generate, from Python, multiple copies
of the entire script with [input] replaced everywhere by [input1,
input2, input3, ...], but this doesn't strike me as a very smart thing
to do.
I have read the faq, and didn't see anything helpful (with the
exception perhaps of a long list of potential sites to wade through,
not really aware of what I could be looking for.) Any ideas, pointers
to specific web sites where such topics are covered, etc., would be
much appreciated.
André
dynamically some web pages, using Python. Unfortunately, I am not
familiar with javascript :-(
I now want to reproduce the same functionality given by the script at
multiple points in the page. Basically, the script goes like this
/* whole bunch of functions with things in them like
input.value
input.focus()
input.selectionEnd
*/
At the very end, I have
function init() {
input = document.getElementById("input");
}
with the appropriate html code (with id="input") appearing on the web
page.
One obvious way to do it is to generate, from Python, multiple copies
of the entire script with [input] replaced everywhere by [input1,
input2, input3, ...], but this doesn't strike me as a very smart thing
to do.
I have read the faq, and didn't see anything helpful (with the
exception perhaps of a long list of potential sites to wade through,
not really aware of what I could be looking for.) Any ideas, pointers
to specific web sites where such topics are covered, etc., would be
much appreciated.
André