[Project_owners] Disable OK button in dialog

HJ bugs4hj at netscape.net
Thu Mar 18 13:35:07 EST 2004


bugs4hj at netscape.net (HJ) wrote:

>Gustavo Araujo Bittencourt <g.bitten at bol.com.br> wrote:
>
>>I am sure there is a very obvious way to enable/disable OK button in 
>>dialog via javascript.
>>I tried this:
>>  
>>document.getElementsByAttribute("label","OK").item(0).setAttribute("disabled", 
>>"true");
>>  
>>document.getElementsByAttribute("label","OK").item(0).removeAttribute("disabled");
>>But returned error
>>
>>TIA,
>>Gustavo Bittencourt.
>
>What dialog (URL) is that?

Please keep in mind that "OK" might be in fact something like "&somelabel.label;" so you might need to change your code or try to use other attributes.

Also, take a look at these files, that might help:
http://lxr.mozilla.org/seamonkey/source/extensions/cookie/resources/content/cookieAcceptDialog.xul
http://lxr.mozilla.org/seamonkey/source/extensions/cookie/resources/content/cookieAcceptDialog.js
http://lxr.mozilla.org/seamonkey/source/xpfe/global/resources/content/dialogOverlay.js

>/HJ

__________________________________________________________________
Introducing the New Netscape Internet Service. 
Only $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need. 

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp


More information about the Project_owners mailing list