|
|
Can you return a dictionary object from a function written in VBScript? Here's what I'm trying to accomplish:
<%
Function PopulateAList()
Dim objList
Set objList=Server.CreateObject("Scripting.Dictionary")
PopulateAList = objList 'Error, having trouble with this.
End Function
%>
<%
Dim objList
objList = PopulateAList()
for each item in objList.items
Response.Write "Hey!"
Next
%>
Thanks.
|
|
|
|
|
Yes, like this:
function x
dim o : set o = createobject("scripting.dictionary")
'do stuff to o
set x = o
end function
dim objlist
set objlist = x()
NATHAN RIDLEY
Web Application Developer
generalgherkin@yahoo.com
|
|
|
|
|
Thanks. My mistake. Got it fixed now.
|
|
|
|
|
CillyMe wrote:
PopulateAList = objList 'Error, having trouble with this.
Your problem is that you aren't using the Set keyword. In VB/VBScript, you have to use the Set keyword to assign an object to a variable or property.
Set PopulateAList = objList
|
|
|
|
|
Hi there!
There is this thing I want to do: I have a webpage where the user may select one or more items in a list. Obviously the listbox allows multiple selection of the items, but you have to press Ctrl or Shift keys to do it, which is not very intuitive or friendly for inexperienced users. So, I think adding checkboxes for each item in the list would be a good solution, but don't know how to do it
I've read about using a datagrid instead of a listbox, but again, don't know how.
Could someone help me out with this??
Thanks in advance!!!
|
|
|
|
|
You can't do it to the listbox specifically, you'd have to create a scrollable div and stcik a list of checkboxes inside it. the posted result will be the same, as long as you make sure all the checkboxes have the same name.
<div style="width:160px; height:200px; border:2px inset; overflow:auto;">
this item<br>
this item<br>
this item<br>
</div>
NATHAN RIDLEY
Web Application Developer
generalgherkin@yahoo.com
|
|
|
|
|
great!!! that's just what I needed
Thanks a lot!!! it worked perfectly
|
|
|
|
|
This looks good.... I give u a '5'
I was born intelligent Education ruined me!.
|
|
|
|
|
I guess the same is used in hotmail... to collect the email addresses in the 'to/cc/bcc' field and add them to the address book after you send the mail.
I was born intelligent Education ruined me!.
|
|
|
|
|
Nathan Ridley wrote:
this item
this item
this item
Since the checkboxes can have more than one checked, how do you tell when multiple boxes are checked?
|
|
|
|
|
If you called your checkboxes "chk", you'd do it like this:
dim obj
for each obj in request.form("chk")
'do something with obj
next
NATHAN RIDLEY
Web Application Developer
email: nathan @ netlab.com.au
[remove the spaces before and after the @ symbol]
|
|
|
|
|
if you are doing a public web site, and you are asked to do a dhtml pull down menu, will you support ns4 and other old browser?
supporting ns4 is somewhere a very daunting task to me, I have downloaded several .net menu control and none of them work in ns4...
i use my ns4 yo browse to www.aspalliance.com, it doesn't work..
So, if you are a developer, how to you test your web site for browser compatability? what browsers are you using to test?
BEN BEN
|
|
|
|
|
My opinion is that NS4 is sufficiently obsolete and unused these days that supporting it is more trouble than it's worth.
I think you can get away with supporting a minimum of IE5.0 and NS6.
NATHAN RIDLEY
Web Application Developer
generalgherkin@yahoo.com
|
|
|
|
|
I concur, Netscape 4 holds a rapidly diminishing and now miniscule percentage of the browser market. You can safely ignore it unless you have specific information relevant to your project that says otherwise.
Internet Explorer 5 and Netscape 6 are the base line browsers.
regards,
Paul Watson
Bluegrass
South Africa
Brian Welsch wrote:
"blah blah blah, maybe a potato?" while translating my Afrikaans.
Crikey! ain't life grand?
|
|
|
|
|
Paul Watson wrote:
Internet Explorer 5 and Netscape 6 are the base line browsers
why not IE 5 / NEtscape 4.7??
I was born intelligent Education ruined me!.
|
|
|
|
|
Are you pulling my leg?
Netscape 4.7 holds less than 1% of the browser market. It does not support modern standards. It costs more money than it is worth to code for.
regards,
Paul Watson
Bluegrass
South Africa
Brian Welsch wrote:
"blah blah blah, maybe a potato?" while translating my Afrikaans.
Crikey! ain't life grand?
|
|
|
|
|
Paul Watson wrote:
Are you pulling my leg?
nope
Paul Watson wrote:
Netscape 4.7 holds less than 1% of the browser market
My server logs says that, 30% of my users are from netscape 4.7!! Thats the reason I asked the question.
Paul Watson wrote:
It does not support modern standards
A end user doesnt know/aware of it when it comes to a free browser. I have seen people complaining the download time and still stick to the 4.7 version that comes in some 'free CDs'
I was born intelligent Education ruined me!.
|
|
|
|
|
SPS wrote:
I have seen people complaining the download time and still stick to the 4.7 version that comes in some 'free CDs'
LOL!!! I have one user who still insists on using IE4.01 because she tried once to upgrade and it broke her computer.
"Your village called - They're missing their idiot."
|
|
|
|
|
Roger Wright wrote:
tried once to upgrade and it broke her computer
Frankly speaking, I am one of them who update the IE/NS/Antivirus from the free / complementary CDs, just to save my internet time!!
I was born intelligent Education ruined me!.
|
|
|
|
|
As I mentioned "You can safely ignore it unless you have specific information relevant to your project that says otherwise."
In this case you have specific information that says support it, 30% is definitley high enough.
What is this website? We run about 50 websites and every single one has less than a percentage per month on Netscape 4.x.
Enjoy supporting N4, it's a PITA.
regards,
Paul Watson
Bluegrass
South Africa
Brian Welsch wrote:
"blah blah blah, maybe a potato?" while translating my Afrikaans.
Crikey! ain't life grand?
|
|
|
|
|
benoityip wrote:
if you are doing a public web site, and you are asked to do a dhtml pull down menu, will you support ns4 and other old browser?
Only your usage logs can tell you if this is a good idea or not.
If a significant percentage of your users are on older browsers, then you need to make sure that they have access to all of your website's functionality.
The ugly truth is that this means either foregoing the nifty coding tricks available for the newer browsers or writing duplicate websites.
Only your server logs can tell you how to proceed.
|
|
|
|
|
ok, heres the deal..
im looking for a way to be able to have a script that will receive email from mutiple users (on same domain) and insert the subject/body into an access database for later use in the site.
also, any attachments to the email (pic/vid/snd) would be placed in a directory with the recipient/users name and the location of the file inserted into the database.
any ideas?
all help is welcomed
thanks!!
|
|
|
|
|
We are trying to set a propery value in our active control using HTML Object and Param property. But the value doesn't seems to get set. The same control works fine with VB. But when I pass it from a HTML Page, I am not getting the value set.
Can anyone share your ideas or workarounds please ?
|
|
|
|
|
We have build a webshop in the framework supplied by the MBS product Axapta.
The framework is initialized and interfaced using an ASP Script, this script will redirect to itself, using extra parameters, when the user logs on.
It seems that Mozilla 4.0 has a bug that makes it unable to handle the 302 reply though, so it starts a request loop that makes the server choke after some time.
This can't possibly be the first time anyone encounters this problem, but I really can't find any information on this.
-- UPDATE;
It seems that i can create the same problem using any browser when cookies are turned off, but Mozilla 4.0 just don't realize it is looping, so unlike any other browsers it just drones on...
"After all it's just text at the end of the day. - Colin Davies
"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
|
|
|
|