[Project_owners] getElementById behavior in firefox 3

Jesper Staun Hansen jesper at selvet.dk
Fri Mar 14 04:36:28 PDT 2008


You should tend to use this instead:
document.getElementById('server1').setAttribute("value", v);
Hope it works.

Jawahar Swaminathan wrote:
> Hi,
> Apologies if I have missed this in previous posts, but I'm having 
> problems updating my extension to work with firefox3.
>
> The code is
>
> function doCMD(el) {
>         var v = el.getAttribute("value");
>         if (v == "") {
>                 alert('No database chosen');
>         } else
>                 alert('Value of v is ' + v);
>                 document.getElementById('server1').value=v;
>                 biobar_SearchMenu();
> }
>
> In firefox2 and before, the value of 
> document.getElementById('server1').value is overwritten with that handed 
> over by variable v. But it would appear this no longer works in ff3.0. 
> I've looked at the developer documentation in MDC but am none the wiser. 
> Would appreciate and be thankful for any suggestions.
>
> regards - Jawahar
>
>
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> https://www.mozdev.org/mailman/listinfo/project_owners
>
>
>   




More information about the Project_owners mailing list