fields with style display:none displayed in IE

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • plsHelpMe
    New Member
    • Jan 2008
    • 58

    fields with style display:none displayed in IE

    Hi All,

    I am facing a weired issue. I am having a search form with some of the fields on it and a button which submits these fields values.
    Functionaly everything is working fine but sometimes when i try to submit my search form i can see the fields which are hidden using the style "display:no ne " visible for a moment just before my page is submitted. I am providing the html code behind those components as follows:

    <div class="formline topalign" id="divdirectio nTextBox" >
    <input type="text" name="direction TextBox" size="45" value="" onkeypress="sub EnterKeyPressHa ndler(event)" class="input marginright10" id="directionTe xtBox">
    </div>
    <div class="formline topalign" id="divisionDro pdown1" style="display: none;">
    <select name="divisionD ropDown1" onchange="showF ieldsDivisionDD (searchFormObje ct.divisionDrop Down1);" class="select" id="divisionDro pDown1Style"> <option value="1">1</option>
    <option value="2">2</option>
    </select>
    </div>
    <div class="formline topalign" id="divisionDro pdown2" style="display: none;">
    <select name="divisionD ropDown2" class="select" id="divisionDro pDown2Style">
    <option value="a">a</option>
    <option value="b">b</option>
    </select>
    </div>

    here, initially only the div with the id "divdirectionTe xtBox" is visible, but when i try to submit the form the fields with the ids "divisionDropdo wn1" and "divisionDropdo wn2" gets visible while the field "divdirectionTe xtBox" hides.

    If anyone has encountered such a problem then please share the solution with me.
    Thanks
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    What are your javascript functions doing?
    Since there is no actual "form" there, the html side will not be doing any "submitting ".
    So whatever it's doing, it's doing in the javascript.

    Comment

    • plsHelpMe
      New Member
      • Jan 2008
      • 58

      #3
      Originally posted by Plater
      What are your javascript functions doing?
      Since there is no actual "form" there, the html side will not be doing any "submitting ".
      So whatever it's doing, it's doing in the javascript.
      Yup on the click of the button present on my search form im submitting the form using the javascript as follows:

      function fnSubmitSearchF orm(target,flag ){
      searchFormObjec t.dispatch.valu e=target;
      searchFormObjec t.persistenceNe eded.value=flag ;
      searchFormObjec t.submit();
      }

      All these things are working finr in mozilla but display the hidden field in the IE browser.

      Comment

      Working...