I do not understand why this is evaluating to be null. Here is the offending code:
Javascript (jQuery) call:
<a href="javascript:;" onmousedown="pheonixTag();">,
<%= disp %>
</a>
Javascript function:
function pheonixTag() {
$("#outer_block").remove();
}
Relevant bit of HTML:
<div id="outer_block"> stuff
<div id="inner_b开发者_C百科lock"></div>
</div>
When i make this call i get the error: Cannot call method remove of null. what gives?
It means that $("#outer_block") returns a null reference instead of the real object. I believe you should use $("outer_block")
I suggest dropping down to a dev console or Firebug in Firefox.
From there I would check for returned js errors and type in my selector query on the console to test it's returning an object.
Where is your function phoenixTag?
精彩评论