473,382 Members | 1,329 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,382 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 1614
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...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.