开发者

Javascript link in aspx page within a SharePoint frame replaces apostrophes to #39 element

I have problem with SharePoint encoding the javascript link, that normally renders like href="javascript:Function('url');" but in Sharepoint 开发者_如何学编程like href="javascript:Function(& #39;url& #39;)" wich of course does not work.

What do I need to do?

I need to be able to use my user control as stand alone as well as linked into a sharepoint page, right!?


Where are you inserting the code? Within a web part, a custom control, etc?

If you are trying to use the Content Editor web part I did notice some differences with it in 2010. When trying to use items that require javascript I just created a .txt file that resides in the SiteAssets. The file contains all the HTML/JS that I would normally add to the web part. Then point/link the Content Editor web part at that file.

This seemed to fix some issues I was having. Could work for you.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜