alexcryout
asked on
CSS Behavior does not work in Safari or Firefox
Hi Experts,
I have a dropdown box:
<asp:dropdownlist id=cmbPeriodStartMonth CssClass="dropdown" tabIndex=-1 runat="server" EnableViewState="True" AutoPostBack="false" width="50px" style="behavior:url(Script \DateFilte r.htc)"></ asp:dropdo wnlist>
It works fine in IE but it does not work in Safari or Firefox. Is there another way to replace it?
Thank you.
I have a dropdown box:
<asp:dropdownlist id=cmbPeriodStartMonth CssClass="dropdown" tabIndex=-1 runat="server" EnableViewState="True" AutoPostBack="false" width="50px" style="behavior:url(Script
It works fine in IE but it does not work in Safari or Firefox. Is there another way to replace it?
Thank you.
<PUBLIC:ATTACH event="onchange" onevent="ProcessChange()" />
<SCRIPT language=javascript>
function ProcessChange()
{
var ndx = this.id.lastIndexOf("_");
var prefix = "";
if(ndx != -1)
prefix = this.id.substring(0,ndx+1);
try
{
switch(this.id)
{
case prefix + "cmbPeriodStartMonth":
MonthChange(prefix + "cmbPeriodStartMonth", prefix + "cmbPeriodStartDay", prefix + "cmbPeriodStartYear");
break;
case prefix + "cmbPeriodStartYear":
YearChange(prefix + "cmbPeriodStartMonth", prefix + "cmbPeriodStartDay", prefix + "cmbPeriodStartYear");
break;
case prefix + "cmbPeriodEndMonth":
MonthChange(prefix + "cmbPeriodEndMonth", prefix + "cmbPeriodEndDay", prefix + "cmbPeriodEndYear");
break;
case prefix + "cmbPeriodEndYear":
YearChange(prefix + "cmbPeriodEndMonth", prefix + "cmbPeriodEndDay", prefix + "cmbPeriodEndYear");
break;
default:
break;
}
}
catch(e)
{
alert(e.message);
}
}
</SCRIPT>
behaviors are a Internet Explorer only feature.
To create a cross platform solution, use Jquery + and an ajax enabled webservice.
No other browser than Internet Explorer will probably ever support these kind of behaviors.
To create a cross platform solution, use Jquery + and an ajax enabled webservice.
No other browser than Internet Explorer will probably ever support these kind of behaviors.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks MlandaT.
ASKER