Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ListBox, ActiveXObject

Reply
Thread Tools

ListBox, ActiveXObject

 
 
=?Utf-8?B?T3Jlbg==?=
Guest
Posts: n/a
 
      04-08-2004
Hi

I have 2 simple questions and hope someone can help me

1) I have an aspx page with the Control: HTML ListBox on it (runat=server). I'm adding options in JavaScript
....
mySelect = document.addFiles.lis
var myI = mySelect.selectedIndex +
mySelect.options[myI] = new Option(sFile,"2"
...

After that I'm doing POST and in the event 'Page_Load' catch this by
if (Request.HttpMethod=="POST"

// How can I find ALL the options that I have added in JavaScript ??
// the: Value && Tex


2) How can I , in JavaScript, get the file size with
// var fso = new ActiveXObject("Scripting.FileSystemObject")
// I get an error - "Automation server can't creat Object" ? why ??? Any Ideas
I'm using File HTML control - I don't need to Upload files but get there size + full name (with full path)

thanx
 
Reply With Quote
 
 
 
 
Viktor Jevdokimov
Guest
Posts: n/a
 
      04-08-2004
1. All of these options should be selected to be sent with the post/get. Or
use hidden input to collect such "options".
2. You can't access ActiveX objects in such way. You may use <OBJECT> tag
for your ActiveX programs, which works in IE only, but security settings may
not to permit to run such objects.

"Oren" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I have 2 simple questions and hope someone can help me:
>
> 1) I have an aspx page with the Control: HTML ListBox on it

(runat=server). I'm adding options in JavaScript:
> ...
> mySelect = document.addFiles.list
> var myI = mySelect.selectedIndex + 1
> mySelect.options[myI] = new Option(sFile,"2")
> ...
>
> After that I'm doing POST and in the event 'Page_Load' catch this by:
> if (Request.HttpMethod=="POST")
> {
> // How can I find ALL the options that I have added in JavaScript ???
> // the: Value && Text
> }
>
> 2) How can I , in JavaScript, get the file size with:
> // var fso = new ActiveXObject("Scripting.FileSystemObject");
> // I get an error - "Automation server can't creat Object" ? why ??? Any

Ideas ?
> I'm using File HTML control - I don't need to Upload files but get there

size + full name (with full path).
>
> thanx



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ActiveXObject("Shell.Application") =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= ASP .Net 4 05-17-2007 12:07 PM
XMLDOM & ActiveXObject reclusive monkey XML 3 01-19-2005 04:51 PM
ActiveXObject is undefined Nomad XML 0 09-14-2004 12:42 PM
ActiveXObject, Problem loading into DOM Nomad XML 1 09-10-2004 10:38 PM
ActiveXObject Oren ASP .Net 1 11-24-2003 07:50 PM



Advertisments