:: Forum >>

textarea and password type?

I'm building a mockup of our current web-application using the demo to convince the higher ups that "Hey, we don't have to love in the stone age of 1999!". The form I'm designing needs textareas and password types. How would I accomplish this?

Also, has anyone integrated an active widget textarea with FCKEditor?
Eric
Sunday, February 26, 2006
There are no special controls for textarea and password, but you can create the standard HTML elements using AW code -

var textarea = new AW.HTML.TEXTAREA;
    document.write(textarea);

    var password = new AW.HTML.INPUT;
    password.setAttribute("type", "password");
    document.write(password);
Alex (ActiveWidgets)
Monday, February 27, 2006
Is there a way I can derive a custom element to do this? The set of standard HTML controls doesn't match the style. I set the same size on an AW.UI.Input item as an AW.HTML.INPUT item and the sizes are rendered completely different, presumably because of the styles.

Really adding two small methods to AW.UI.Input (or one with an enum) would seem the best option. I know you are against adding stuff, but MultiLine text areas and Password types are integral UI elements in ANY framework :)

var pwbox = new AW.UI.Input;
pwbox.setType(AW.UI.Input.PasswordType);
document.write(pwbox);

var txbox = new AW.UI.Input;
txbox.setType(AW.UI.Input.MultilineType);
document.write(txbox);


Is inheritance possible to override the writing of the <input> portion?
Eric
Wednesday, March 1, 2006
Here is a possible solution for your password needs:

AW.UI.PasswordInput = AW.UI.Input.subclass();
AW.UI.PasswordInput.create = function()
{
var obj = this.prototype;
obj.getContent("box/text").setAttribute("type", "password");
}

var pwInput = new AW.UI.PasswordInput;
Jim Hunter (www.FriendsOfAW.com)
Wednesday, March 1, 2006
Excellent. That works perfect, Jim. I'm guessing the same cannot be done for textarea?
Eric
Wednesday, March 1, 2006
I tried quickly on the textarea but didn't try very hard. If I come up with something I'll post it.
Jim Hunter (www.FriendsOfAW.com)
Thursday, March 2, 2006
Eric,

Try this for your TEXTAREA, you should get a textarea styled just like your input controls:

AW.UI.TextAreaInput = AW.System.Control.subclass();
AW.UI.TextAreaInput.create = function()
{
var obj = this.prototype;
obj.setTag("textarea");
obj.setClass("text", "expand");
obj.setClass("item", "control");
obj.setClass("ui", "imagetext");
obj.setClass("templates", "");
obj.setClass("input", "box");
}

a = new AW.UI.TextAreaInput;
a.setSize(100,100);
a.setPosition(10,10);
document.write(a);
Jim Hunter (www.FriendsOfAW.com)
Thursday, March 2, 2006
In the examples provided for the text area control, how can we set the text of the control at runtime? I thought something like:

<script>
textarea.setControlText("hi");
</script>

what can we do?

Thanks
DJ AM Juicebox
Thursday, March 16, 2006
For the textarea example above you would use:

<script>
a.setContent("hi");
</script>
Thursday, August 17, 2006
how can GET textarea Conten ?
Valeri
Thursday, August 24, 2006
obj.element().value;
Saturday, August 26, 2006

This topic is archived.


Back to support forum

Forum search