[Javascript] Help: code doesn't work in IE: thanks

Reuben D Budiardja reubendb at goshen.edu
Fri Jul 20 12:55:22 CDT 2001


Rodney,
Thanks for the help. I follow your suggestion. It works fine now.

Thanks again.
Reuben D. B.

On Friday 20 July 2001 11:25 am, Rodney Myers wrote:
> Reuben,
>
> I looked at your code with interest thinking, "I didn't know you could do
> that" and since you have the problem maybe it is true - you cannot. If not
> someone else will leap in I hope!
>
> Try
>
> function something (formName, selectName, toggleName)
> {
>
> var selectObj = eval("document."+formName+"."+selectName);
>
> but better still if you passed the select OBJECT to the function in the
> first place you could avoid all that.
>
> <select onselect="something(this.form,this,'TOGGLENAME')">
>
> function something(form,List,toggleName){ ... }
>
> hth
>
> Rodney
>
> Reuben D Budiardja wrote:
> > Hello,
> > I have the following code works in Netscape, but it does n't work in IE.
> > Could someone tell me why, and how to fix it?
> >
> > This is part of a bigger function, but I think I've determined that the
> > following is causing the error:
> >
> > function something (formName, selectName, toggleName)
> > {
> > // formName, selectName, toggleName containts something
> > var selectObj = document.eval(formName).eval(selectName);
> > var toggleObj = document.eval(formName).eval(toggleName);
> > }
> >
> > Those 2 declaration of selectObj and toggleObj does not work in IE.
> > Please help.
> >
> > Thanks in advance.
> > Reuben D. Budiardja
> > _______________________________________________
> > Javascript mailing list
> > Javascript at LaTech.edu
> > http://www.LaTech.edu/mailman/listinfo/javascript
>
> --
> Shop at ssistant Add-ons and Developer Workshops
> http://www.aflyingstart.net/addons/
>
> Enquiries regarding Shop at ssistant Classic training :
> Call 01256 880770
>
> Rodney Myers
> Based in Oxford, England
> Technical Director, Shop at ssistant eCommerce Solutions
>



More information about the Javascript mailing list