:: Forum >>

How do I get a browse button actived using AW

here is a regular HTML page which gives browse button, if I don't want to use HTML but use AW.

HTML src from somewhere in the WEB:
<FORM ENCTYPE="multipart/form-data" ACTION="_URL_" METHOD=POST>

File to process: <INPUT NAME="userfile1" TYPE="file">


Thursday, October 21, 2010
http://www.activewidgets.com/javascript.forum.23180.2/how-to-create-input-type.html
Thursday, October 21, 2010
That was really. Now that I get the browser window, how do I get the text (which is file name including full path) retrieved in some other function in the same file.
Thursday, October 21, 2010
Just use UI.Input instead of HTML.INPUT like:
var obj = new AW.UI.Input;
obj.getContent('box/text').setAttribute("type", "file");
obj.setStyle('width', '200px')
document.write(obj);

obj.onControlTextChanged = function(text){ alert(text) }
Friday, October 22, 2010
you are cool. this time results were different. I used different functions to retrieve the full name with no luck it always prints "C:\fakepath\filename", no matter which location I pick.

Here are different options I tried to get the text printed:
obj.onControlTextChanged = function(text){ alert(text);
alert(this.getControlText());
alert(this.getContent('box/text').getAttribute("value")) }

Which function should I use? :)
Friday, October 22, 2010

This topic is archived.


Back to support forum

Forum search