Does anyone know if the Mac Browsers (IE5 / Safari) support anonymous
functions or lambda functions? Ive been trying to get a site working
with the Mac browsers and just cant get it to work. Here is an example
of what Im trying to do:
function CSelect(sName, id, bmpReqRO, minOptions, onvalid, isAddr,
sLabel){
this.obj = document.getEle mentById(id);
this.focus = m_focus;
this.blur = m_blur;
this.disable = m_disable;
this.enable = m_enable;
//alert(sName);
var slct = makeProps(this, bmpReqRO, id);
//alert(slct.requ ired);
if (navigator.appV ersion.indexOf( "Mac") > -1)
{
slct.options = slct.obj.option s;
}
else
{
slct.options = obj.options;
}
slct.label = sLabel;
slct.minOptions = minOptions;
slct.type = "Select";
if(onvalid)
slct.onvalid = new Function(onvali d);
slct.getValue = function slct_getValue() {
return slct.obj.value
}
if(slct.readOnl y){
slct.disable();
}
//if(slct.obj.get Attribute("OnSe lect")){
//slct.obj.onchan geFunc = slct.obj.onchan ge;
//slct.obj.onchan ge = new Function("onIte mSelect(this)") ;
//}
if (navigator.appV ersion.indexOf( "Mac") > -1)
{
if(slct.obj.get Attribute("OnSe lect")){
obj.onchangeFun c = slct.obj.onchan ge;
// THIS LINE DOES NOT WORK WITH THE MAC
obj.onchange = new Function("onIte mSelect(this)") ;
}
}
else
{
if(slct.obj.get Attribute("OnSe lect")){
slct.obj.onchan geFunc = slct.obj.onchan ge;
slct.obj.onchan ge = new Function("onIte mSelect(this)") ;
}
}
.. . . Continued . . .
function onItemSelect(oS elect){
var oSelected = oSelect[oSelect.selecte dIndex];
var onselect = oSelected.getAt tribute("onSele ct");
if(oSelect.onCh angeFunc)
oSelect.onChang eFunc();
if(onselect){
var oSelectedFunc = new Function(onsele ct);
oSelectedFunc() ;
}
}
functions or lambda functions? Ive been trying to get a site working
with the Mac browsers and just cant get it to work. Here is an example
of what Im trying to do:
function CSelect(sName, id, bmpReqRO, minOptions, onvalid, isAddr,
sLabel){
this.obj = document.getEle mentById(id);
this.focus = m_focus;
this.blur = m_blur;
this.disable = m_disable;
this.enable = m_enable;
//alert(sName);
var slct = makeProps(this, bmpReqRO, id);
//alert(slct.requ ired);
if (navigator.appV ersion.indexOf( "Mac") > -1)
{
slct.options = slct.obj.option s;
}
else
{
slct.options = obj.options;
}
slct.label = sLabel;
slct.minOptions = minOptions;
slct.type = "Select";
if(onvalid)
slct.onvalid = new Function(onvali d);
slct.getValue = function slct_getValue() {
return slct.obj.value
}
if(slct.readOnl y){
slct.disable();
}
//if(slct.obj.get Attribute("OnSe lect")){
//slct.obj.onchan geFunc = slct.obj.onchan ge;
//slct.obj.onchan ge = new Function("onIte mSelect(this)") ;
//}
if (navigator.appV ersion.indexOf( "Mac") > -1)
{
if(slct.obj.get Attribute("OnSe lect")){
obj.onchangeFun c = slct.obj.onchan ge;
// THIS LINE DOES NOT WORK WITH THE MAC
obj.onchange = new Function("onIte mSelect(this)") ;
}
}
else
{
if(slct.obj.get Attribute("OnSe lect")){
slct.obj.onchan geFunc = slct.obj.onchan ge;
slct.obj.onchan ge = new Function("onIte mSelect(this)") ;
}
}
.. . . Continued . . .
function onItemSelect(oS elect){
var oSelected = oSelect[oSelect.selecte dIndex];
var onselect = oSelected.getAt tribute("onSele ct");
if(oSelect.onCh angeFunc)
oSelect.onChang eFunc();
if(onselect){
var oSelectedFunc = new Function(onsele ct);
oSelectedFunc() ;
}
}
Comment