开发者

ajax toolkit error

开发者 https://www.devze.com 2023-02-14 17:07 出处:网络
I am using this code in asp.net 4.0: panel = $(\'#<%= Panel1.ClientID %>\') panelBounds = CommonToolkitScripts.getBounds(panel); // error here

I am using this code in asp.net 4.0:

 panel = $('#<%= Panel1.ClientID %>')
 panelBounds = CommonToolkitScripts.getBounds(panel); // error here

where panel1 is asp.net panel

and getting this error

Microsoft JScript runtime error: Sys.ArgumentException: Val开发者_StackOverflow社区ue must be a DOM element. Parameter name: element

How to fix this? also, Is there any alternative of getbounds in jquery to hold height width X and Y location?


$('xxx') returns a jQuery object, not a DOM object. To get a DOM ref just use:

panel = document.getElementById('<%= Panel1.ClientID %>');

Use .positon, .width, .height in jQuery.

0

精彩评论

暂无评论...
验证码 换一张
取 消