views:

43

answers:

1

I have placed a form on a page which looks like this:

<form id="editClassList" name="editClassList" method="get" action="EditClassList">
    <label>
        <input name="class-to-add" id="class-to-add" size="42" type="text">
    </label>
    <label>
        <input name="save-class-btn" id="save-class-btn" value="Save Class(es)" type="submit">
    </label>
</form>

But when it get's rendered by a browser it comes out like this:

<form id="editClassList" name="editClassList" method="get" action="EditClassList">
    <label>
        <input style="display: none;" name="class-to-add" id="class-to-add" size="42" type="text">
    </label>
    <label>
        <input name="save-class-btn" id="save-class-btn" value="Save Class(es)" type="submit">
    </label>
</form>

For some reason style="display: none;" is being added, and I cann't understand why. This results in the text box not displaying.

+2  A: 

It sounds like you might have some javascript code that is adding the display:none; tag after the page loads. (Or You could have that in the CSS, but I don't think Firebug would show that in the DOM inspector)

webdestroya
@webdestroya you were right, there was some old convoluted Javascript at the top of the page. I removed all the JS and it displays.
Ankur
Glad it worked out. Make sure you mark the question as answered!
webdestroya