JQuery cannot find my element. What for?

UPDATE: Stupid, I did not notice that CASE was not accurate. I struggled with this for 30+ minutes and you guys saw my problem in less than 5! Thank you for saving me a lot of grief - I'm still a beginner in programming anyway, I need to learn to look at such trifles as this, but thanks, it never crossed my mind :)

Sorry, everything - this is misleading earlier because I forgot to put quotes in my question, but I can assure you that I know that quotes are required for the JQuery selector, and I used them ...

<div id='question' style="background-color:#DAE2E8;border-color:#A2B3C7;border-width:1px;border-style:solid"><br /> 
    <table id='searchtable' border='0'>
        <tr>
            <td><span class="label">Question ID:</span><input id='QuestionId' type='text'/></td>
            <td><span class="label">Question Title:</span><input id='QuestionTitle' type='text'/></td>
            <td><span class="label">Original URL:</span><input id='OriginalURL' type='text'/></td>
            <td><span class="label">Original Title:</span><input id='OriginalTitle' type='text' /></td>
            <td><span class="label">Chronic ID:</span><input id='ChronicID' type='text' /></td>   
        </tr><tr>
            <td><span class="label">Expert Name:</span><input id='ExpertName' type='text'/></td>  
            <td><span class="label">Topic ID:</span><input id='TopicID' type='text'/></td>
            <td><span class="label">Channel ID:</span><input id='ChennelID' type='text''/></td>
            <td><span class="label">Funded: </span><input id='IsFunded' type='text'/></td>
            <td><span class="label">Funded Partner:</span><input id='FundedPartner' type='text'/></td>
        </tr><tr>
            <td><input type="submit" value="Submit" onclick='ApplyNewFilters(this)' /></td>
        </tr>  
    </table>
</div>

So here is my HTML code (its on aspx page). I tried using $("#QuestionID").val()to get the value, but that will not work. I also tried $("input#QuestionID").val().

+5
7

:

$("#QuestionId").val()

.

+10

, ?

$("#QuestionId").val()

, firebug , script

+4

QuestionId not QuestionID

+3

, "Id"

$("#QuestionId").val()

.

+2

. $('#QuestionId').val() $('input#QuestionId').val()

+1

<input id='ChennelID' type='text''/>
+1

<td><span class="label">Channel ID:</span><input id='ChennelID' type='text''/></td>

<td><span class="label">Channel ID:</span><input id='ChennelID' type='text' /></td>

'

<asp:TextBox /> 

var javascript asp

var ChannelID = <%=txtChannelID.ClientID %>

clientid -

+1

All Articles