473,324 Members | 2,567 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

ListBox, ActiveXObject

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
Nov 18 '05 #1
2 1609
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" <an*******@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com...
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

Nov 18 '05 #2
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" <an*******@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com...
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

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Nomad | last post by:
I'm trying to load an XML document into the DOM using the ActiveXObject I've succeeded in doing this on one machine. Which shouldn't becaus I've checked for the ActiveXObject and it doesn't...
1
by: Brian McPheeters | last post by:
Is there anyway to get ActiveXObject('Msxml2.XMLHTTP') to work with Mac IE 5.1 on the client side? I need to get a text response from the server with javascript so I can parse it. This seems to...
2
by: Marcin Zmyslowski | last post by:
Hello all! I have installed MSDE on my local computer - Windows 2000 Professional. I have created a function which runs me a link whose path is placed in the input field. This function looks...
2
by: Peter Kirk | last post by:
Hi there, I am having trouble with ActiveXObject. I have a function which includes this snippet: alert('INIT 1'); orgdoc = new ActiveXObject('Microsoft.XMLDOM'); alert('INIT 2'); I see...
0
by: Oren | last post by:
hi, i have an aspx page: on it there is two server controls- ListBox and button OK. and there are two html controls too- file and input button. when i choose a file and press the input...
1
by: Oren | last post by:
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 =...
0
by: ndronen | last post by:
Hi: I have a DLL compiled from C# that I have to be able to use within an HTML document. This is relatively easy to do following the suggestions on this page: ...
1
by: CraigMuckleston | last post by:
I have the following php code that retrieves a list of items. I want to populate a listbox with the XMLHttpRequestObject, but I am getting 1 long string instead of each item on a line. How can I...
11
by: nitinsingh1 | last post by:
Hi, I am using ActiveXobject as var xp = new ActiveXObject("WPrint.PrintCtl"); in my JSP application. I have heard that using ActiveXobject may be dangerous for my application as i am using...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.