开发者

In Visualforce pages, is it possible to use the command line in the Firebug console?

On Visualforce pages, commands run in the Firebug console command line don't seem to work. For example $(".myClass").show(); returns TypeError: $(".moreInfo") is null.

I think this is because the Visualforce is all inside an iframe, so my jQuery is included insid开发者_JS百科e the iframe and all the elements I'm trying to select are also inside this iframe. I'm looking for a workaround if anyone knows of one.


If the user viewing the Visualforce page is in development mode, the Visualforce page will be displayed in an IFRAME.

So try disabling "development mode" on your user's User Detail Page.

Søren


I've always found when using jQuery with VisualForce that it's best to use jQuery.noConflict() when the page loads and then reference it via jQuery() as opposed to $() thereafter.

I've just tried using both $(xx) and jQuery(xx) in the console — the former shows the same error you're seeing, the latter works correctly.

Matt

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜