Created
October 15, 2009 18:38
-
-
Save esquifit/211172 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="ISO-8859-1"?> | |
<bindings xmlns="http://www.mozilla.org/xbl"> | |
<!-- 1 - Allow for larger result sets --> | |
<binding id="listsize"> | |
<implementation> | |
<constructor> | |
<![CDATA[ | |
var newOption = function(selElm, val){ | |
var sel = document.createElement('OPTION'); | |
sel.setAttribute('value', val); | |
sel.appendChild(document.createTextNode(val)); | |
//this.appendChild(sel); | |
selElm.insertBefore(sel,selElm.firstChild); | |
} | |
newOption(this, '50'); | |
newOption(this, '100'); | |
newOption(this, '200'); | |
newOption(this, '500'); | |
newOption(this, '1000'); | |
]]> | |
</constructor> | |
</implementation> | |
</binding> | |
<!-- 2 - Set defaults when first loading the page --> | |
<binding id="defaults"> | |
<implementation> | |
<constructor> | |
<![CDATA[ | |
var form = this; | |
var setDefault = function(el,val){ | |
var sel = form.elements.namedItem(el); | |
if(sel) sel.options[val].selected = true; | |
} | |
setDefault('BIBLOK','4'); | |
setDefault('NNORRQ','3'); | |
setDefault('SLSTRZ','4'); | |
]]> | |
</constructor> | |
</implementation> | |
</binding> | |
</bindings> | |
<!-- vim:syntax=xml:sw=4:ts=4 --> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment