3.2.0

How to update DOM for form post in legacy xhtml forms with AW

Trying out AW. Trying to simply replace an existing input control with an AW input. Not getting the data back when the form is posted.

<form id="myform" method="post"...>
<head>
[reference all javascript and css libraries]
...
...
<input type="text" name="d1234" id="d12345" value="chocolate" />
</form>

I'm trying to replace the input with an AW:

<script>
var d1234 = new AW.HTML.INPUT;
d1234.setId("d12345");
d1234.setControlText("chocolate");
document.write(d1234);
</script>

The form renders and the control operates properly.

When the form is submitted, I do not get the post value for d1234. I get all of the other post data.
n4hpg
May 30,
It should be either
var d1234 = new AW.UI.Input;
d1234.setId("d12345");
d1234.setName("d1234");
d1234.setControlText("chocolate");
document.write(d1234);


or if you prefer plain html elements -

var d1234 = new AW.HTML.INPUT;
d1234.setId("d12345");
d1234.setAttribute("name", "d1234");
d1234.setAttribute("value", "chocolate");
document.write(d1234);


Alex (ActiveWidgets)
May 30,
http://www.activewidgets.com/javascript.forum.21922.7/using-widgets-as-replacement-for.html
May 30,

This topic is archived.

See also:


Back to support forum