eddy556 Posted March 27, 2009 Share Posted March 27, 2009 Please take a look at the following code, it works as expected in IE but in firefox gives this error: Error: ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper is not defined Source File: http://localhost:1981/user_area.aspx Line: 1 <div style="vertical-align:top; overflow:hidden;vertical-align:middle; table-layout:fixed;"> <span id="ctl00_ContentPlaceHolder1_lblCompName">Company Name:</span> <div id="ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper" nowrap="nowrap" style="width:auto;display:inline;"> <input name="ctl00$ContentPlaceHolder1$ComboBoxCompany$ComboBoxTextBox" type="text" id="ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox" onkeydown="if(event.keyCode == 9){ScsComboBox_ListBoxDisplaySelectedText(ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper_ListBox,ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox);return false;}" onkeyup="ScsComboBox_TextBoxKeyup(ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox,ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper_ListBox,event)" onmouseover="javascript:if(ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox!=_activeComboBoxTextBox) ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox.className='';" onmouseout="javascript:if(ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox!=_activeComboBoxTextBox) ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox.className='';" onfocus="javascript:ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox.className='';SetActiveComboBoxTextBox(ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox);" onblur="javascript:ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox.className='';SetActiveComboBoxTextBox(null);ScsComboBox_TextBoxBlur(this,ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper_ListBoxWrapper)" /><img id="ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxPopupImage" onclick="ScsComboBox_ListBoxShow(ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper,ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper_ListBoxWrapper);" src="/WebResource.axd?d=X2Mjr-4_fQgIerHGoJmLA4beQeL_mfrdmCV81jcoxue0BEu7vgKAFYZC1vKcoczQLOBzEgrPxoh-ptiiioWRcw2&t=633717605465074708" align="absmiddle" style="border-width:0px;" /><div id="ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper_ListBoxWrapper" style="position:absolute;visibility:hidden;top:-100px;left:-100px;"> <select size="5" id="ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper_ListBox" name="ctl00$ContentPlaceHolder1$ComboBoxCompany" onclick="ScsComboBox_ListBoxDisplaySelectedText(ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper_ListBox,ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox);" onchange="shouldIPostBack()(this);" onkeyup="ScsComboBox_ListBoxKeyup(ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper_ListBox,ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox,event);" onblur="ScsComboBox_ListBoxHide(ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper_ListBox.offsetParent);javascript:ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox.className='';SetActiveComboBoxTextBox(null);" onmouseover="javascript:if(ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox!=_activeComboBoxTextBox) ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox.className='';" onmouseout="javascript:if(ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox!=_activeComboBoxTextBox) ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox.className='';" onfocus="javascript:ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox.className='';SetActiveComboBoxTextBox(ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxTextBox);"> <option selected="selected" value="-1"></option> <option value="ABC Ltd">ABC Ltd</option> <option value="hello">hello</option> <option value="Tirril Brewery">Tirril Brewery</option> </select> </div> </div> With the following function called on the onclick event: function ScsComboBox_ListBoxShow(txtBxWrapper, lstBxWrapper) { if(lstBxWrapper.style.visibility == "visible") { ScsComboBox_ListBoxHide(lstBxWrapper); return; } var pos = findPos(txtBxWrapper); var top = pos[1]; var left = pos[0]; lstBxWrapper.style.left = left+1; lstBxWrapper.style.top = top+txtBxWrapper.offsetHeight; lstBxWrapper.style.visibility = "visible"; lstBxWrapper.all[0].focus(); lstBxWrapper.all[0].style.width = txtBxWrapper.offsetWidth; } I apologies for the formatting of the code, but I am interested in the image tags onclick event: <img id="ctl00_ContentPlaceHolder1_ComboBoxCompany_ComboBoxPopupImage" onclick="ScsComboBox_ListBoxShow(ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper,ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper_ListBoxWrapper);" As you can see this fires the above javascript. Link to comment https://forums.phpfreaks.com/topic/151395-firefox-javascript-problem/ Share on other sites More sharing options...
darkfreaks Posted March 27, 2009 Share Posted March 27, 2009 found nothing in jslint or the online lint can you show me to a link so i can see if anything pops up errorwise ??? Link to comment https://forums.phpfreaks.com/topic/151395-firefox-javascript-problem/#findComment-795196 Share on other sites More sharing options...
eddy556 Posted March 27, 2009 Author Share Posted March 27, 2009 Sorry its is currently all under development and so there is no live server hosting this. The bug is caused by the output of this control: http://dotnetslackers.com/articles/aspnet/Custom_ASPNET_ComboxBox_Control.aspx I works perfectly in IE, but I know how firefox is on standards etc (not a bad thing). But no matter what I do I cannot produce a workaround. Link to comment https://forums.phpfreaks.com/topic/151395-firefox-javascript-problem/#findComment-795316 Share on other sites More sharing options...
darkfreaks Posted March 27, 2009 Share Posted March 27, 2009 <div id = " ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper "> ScsComboBox_ListBoxShow(ctl00_ContentPlaceHolder1_ComboBoxCompany_Wrapper) </div> have you tried something like thAT ??? Link to comment https://forums.phpfreaks.com/topic/151395-firefox-javascript-problem/#findComment-795329 Share on other sites More sharing options...
eddy556 Posted March 27, 2009 Author Share Posted March 27, 2009 Ahh gud idea, I did try something similar - but I've finished work now so Ill test first thing monday :-) Link to comment https://forums.phpfreaks.com/topic/151395-firefox-javascript-problem/#findComment-795366 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.