on 05-10-2004 12:56 PM
Hello
I´m trying to set the value of an inputField via Javascript. I found the following example in the pdk documentation:
Getting the inputField object in JavaScript:
function calculateCurrencyFromTo(){
var funcName = htmlb_formid+"_getHtmlbElementId";
func = window[funcName];
var inputfield = eval(func("currencyDisplay"));
// Now we have the inputField, so we can access it, for example set a new value
if (inputfield)
inputfield.setValue("100.23");
}
The only thing, that i´ve changed is the field id according to my field id.
I don´t have any clue why it isn´t working.
Do you have any ideas, or other solutions to fill an input field via javasrcipt
regards
Alexander
I use this:
function getHtmlbElement( pElementId )
{
var loDocForms = document.forms;
for( var i=0; i<loDocForms.length; i++ )
{
try
{
var funcName = loDocForms<i>.id + "_getHtmlbElementId";
func = window[funcName];
var element = eval( func(pElementId) );
if(element)
{
return element;
}
}
catch( ex )
{
}
}
}
Cause it could be that there are multiple forms on the current page. The parameter 'elementId' is the id defined on the server.
Regards,
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I use this:
function getHtmlbElement( pElementId )
{
var loDocForms = document.forms;
for( var i=0; i<loDocForms.length; i++ )
{
try
{
var funcName = loDocForms<i>.id + "_getHtmlbElementId";
func = window[funcName];
var element = eval( func(pElementId) );
if(element)
{
return element;
}
}
catch( ex )
{
}
}
}
Cause it could be that there are multiple forms on the current page. The parameter 'elementId' is the id defined on the server.
Regards,
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.