473,399 Members | 2,774 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,399 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 1616
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.