Hello,
I am trying to put a value from my main program, to a hidden input of my window (rml).
From document, I find the control, and I wish to use SetValue, but I got an error of undefined method.
My rml :
<body template="pywindow" onload="LoadOptions(document)">
<form name="formtest" onsubmit="SaveOptions(event, document);">
<input type="hidden" id="objid" name="objid" value="0"/>
<p>Informations</p>
<br/>
<p>Name : <input id="name" type="text" name="name" value="" /></p>
<br/>
<p><input type="submit" name="button" value="close">close</input></p>
</form>
</body>
my main program:
doc = context.LoadDocument('data/options.rml')
a=doc.GetElementById('objid')
a.SetValue("kk")
My error :
AttributeError: 'ElementFormControlInput' object has no attribute 'SetValue'
The documentation says that there is a SetValue method:
But in a script into the rml, I can access to the hidden input.
document.GetElementById('name').value="val" + document.GetElementById('objid').value
I don’t know what’s wrong…