Jscript translation to VBscript 
Author Message
 Jscript translation to VBscript

Hi,

I try to delete an option of a drop-down-list by VBScript.
Using JScript it works with this code:

document.form1.dropdown1.options[2] = null;

Translated to VBscript it doesnt work. Why not !?

document.form1.dropdown1.options(2) = Null

I'm really confused. Is there someone who can help?

Martin Hoehn
(Germany)



Fri, 16 Jul 2004 17:01:48 GMT  
 Jscript translation to VBscript
Try "nothing" instead of "null".


Quote:
> Hi,

> I try to delete an option of a drop-down-list by VBscript.
> Using JScript it works with this code:

> document.form1.dropdown1.options[2] = null;

> Translated to VBscript it doesnt work. Why not !?

> document.form1.dropdown1.options(2) = Null

> I'm really confused. Is there someone who can help?

> Martin Hoehn
> (Germany)



Fri, 16 Jul 2004 19:12:52 GMT  
 Jscript translation to VBscript
Hi Alex,

Quote:
> Try "nothing" instead of "null".

Thank you very much.
But it doesent work anyway :-(
Maybe someone else has an other idea?

Here is the line I want to translate into VBscript:

Quote:
> > document.form1.dropdown1.options[2] = null;

I tried:
document.form1.dropdown1.options(2) = Null
document.form1.dropdown1.options(2) = Nothing
Set document.form1.dropdown1.options(2) = Nothing

Martin



Sat, 17 Jul 2004 15:00:00 GMT  
 Jscript translation to VBscript
Try

dropdown1.Remove(1)


Quote:
> Hi Alex,

> > Try "nothing" instead of "null".

> Thank you very much.
> But it doesent work anyway :-(
> Maybe someone else has an other idea?

> Here is the line I want to translate into VBscript:

> > > document.form1.dropdown1.options[2] = null;

> I tried:
> document.form1.dropdown1.options(2) = Null
> document.form1.dropdown1.options(2) = Nothing
> Set document.form1.dropdown1.options(2) = Nothing

> Martin



Sat, 17 Jul 2004 15:24:51 GMT  
 Jscript translation to VBscript
Hi Han,

Quote:
> dropdown1.Remove(1)

Thats it !! Thanks a lot.

Why must this be so different to JScript? ;(

Martin



Sat, 17 Jul 2004 16:53:59 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. JScript translation from VBScript

2. translation from vbscript into javascript for compatibiliti with Netscape 4.7

3. VBScript Translation

4. Translation from JAVASCRIPT to VBscript - please

5. Translation from VisualBasic into vbscript

6. VBScript Translation

7. Invoking Spell Ckecker from VBScript/Jscript

8. Vbscript class in jscript page (ASP)

9. Progamming between VBScript & JScript

10. calling ASP from within VBScript/JScript ???????

11. calling vbscript function from jscript

12. VBScript/JScript Challange.

 

 
Powered by phpBB® Forum Software