Link to home
Start Free TrialLog in
Avatar of vbnetcoder

asked on

geting the value of what is in a div tag from an id

return the value from an id

in my jquery code i am trying to do this

var IsNew = $("#init");

in my markup i am doing this

            <HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle" Wrap="false" Width="40" />
                <div style="margin-left: 2px;" id ="init" class="trimmed"><%# Eval("init")%></div>
            <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="40" />

I want to get the value that is in the div where the cell is = init.

What am i doing wrong
Avatar of Chris
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Did you check to see if once this is actually the id of the div once this scrip runs, with .net it often ends up with things that look like this id="ctl00_ContentPlaceHolder1_RadNotification1_XmlPanel" so make sure that your id is what it actually ends up with at runtime.
Also you could try using .html to find the contents within an element
Avatar of vbnetcoder