Open main menu

CDOT Wiki β

Changes

BookmarkPage

1,847 bytes added, 11:28, 29 September 2006
no edit summary
==Bookmark > Bookmark This Page==

[http://landfill.mozilla.org/mxr-test/mozilla1.8.x/source/extensions/cck/browser/resources/content/cckwizard/bookmark.xul /extensions/cck/browser/resources/content/cckwizard/bookmark.xul]
<code>
45 <dialog id="createbookmark" title="&bookmark.label;"
46 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
47 buttons="accept,cancel"
48 ondialogaccept="return OnBookmarkOK()"
49 onload="OnBookmarkLoad();"
50 width="500"
51 height="200"
52 >
53 <script src="chrome://cckwizard/content/cckwizard.js"/>
54 <vbox>
55 <label>&bookmark.description;</label>
56 <label control="bookmarkname">&bookmarkTitle.label;</label>
57 <textbox flex="1" id="bookmarkname" onchange="bookmarkCheckOKButton();" onkeyup="bookmarkCheckOKButton();"/>
58 <label control="bookmarkurl">&bookmarkURL.label;</label>
59 <textbox flex="1" id="bookmarkurl" onchange="bookmarkCheckOKButton();" onkeyup="bookmarkCheckOKButton();"/>
60 <checkbox id="liveBookmark" label="Live Bookmark"/>
61 </vbox>
62 </dialog>
</code>
- Defines the the Add Bookmark dialog box.

[http://landfill.mozilla.org/mxr-test/mozilla1.8.x/source/extensions/cck/browser/resources/content/cckwizard/cckwizard.js /extensions/cck/browser/resources/content/cckwizard/cckwizard.js]
<code>
538 function bookmarkCheckOKButton()
539 {
540 if ((document.getElementById("bookmarkname").value) && (document.getElementById("bookmarkurl").value)) {
541 document.documentElement.getButton("accept").setAttribute( "disabled", "false" );
542 } else {
543 document.documentElement.getButton("accept").setAttribute( "disabled", "true" );
544 }
545 }
</code>
- Enable the OK button only if the bookmark name and URL is defined.
1
edit