asp.net - Javascript not working on google chrome and smartphone browsers -


i working on asp.net/c# web application have check box. , want check box simulate button click when checked/unchecked

i used javascript it

<input id="filtercheck" runat="server" type="checkbox" value="filter" onclick="document.getelementbyid('button1').click();"/> 

button1 normal button

<asp:linkbutton id="button1" runat="server" onclick="button1_click"/> 

so when click on checkbox, same if clicked on button1.

everything works fine on firefox , internet explorer. not working on google chrome , smartphone browsers

how can fix problem?

in addition there few other javascript , jquery scripts working on internet explorer , firefox not on google chrome , smartphone browsers.

what can make sure website compatible on browsers?

thanks lot help

edit: yep, first thing. chrome choking on linkbutton , not rendering expected.

i going ask. id same html id attribute? how asp "linkbutton" render html?

edit: i'll leave rest here in case it's helpful else having trouble asp.net shenanigans.

have validated html. you're doing isn't particularly crazy. html breakage might cause.

also, try firing function once through other means in chrome.

one thing that's helpful though. javascript off page , put in linked file. not let microsoft product tell making js easier doing way. best thing ever did .net mvc gets hell out of way.

edit: wait. using webforms? might problem. in case might have fire focus , click @ stupid thing. ms engineers safeguard against people finding easy way daisy-chain around tomfoolery. waded through lot of horrendous js figure 1 out while back.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -