Guys,
I have input boxes and want to 'in realtime' copy the edits to the Input boxes into some Span fields that are on the page. I'm doing this by calling a Javascript function on each KeyUp on the text and textarea inputs.
I've written a function to which I can pass the formname, text field ID and span ID, but its not working, I'm guessing I've done something silly somewhere?
Here's the function...
function Ash_CopyInputToSpan(TheForm, TheInputSource, TheSpanDestination) {
var TheFormVar = document.getElementById(TheForm);
var TheInputSourceVar = TheFormVar.getElementsById(TheInputSource);
var TheSpanDestinationVar = getElementsById(TheSpanDestination);
TheSpanDestinationVar.value = TheInputSourceVar.value;
}
Here's how I'm calling it in one example (in an OnKeyUp)...
Ash_CopyInputToSpan(form_createbanner,AdvertTitle,Live_Title)
Really appreciate your help!