Lambert 的个人资料Lambert Qin's technical ...照片日志列表更多 ![]() | 帮助 |
|
|
8月31日 Create an survey with pictures and other HTML formatsOne of the limitations of SharePoint is that it only support an simple text format survey which is not enough for many scenarios. However, create a full customized ASP.NET survey for SharePoint is not easy, it involves a lot of coding work. Here is an general method that help administrartors and power users who have limited coding skill to build a beautiful survey. Step 1: create an OOB survey.Step 2: Open the survey in SharePoint Designer,upload a picture which would be used later.Step 3:Create a HTML page in SharePoint Designer, design your survey. Copy the HTML code.Step 4:Paste the HTML into the question (notice: must include the Table tag)Preview: Step 5:Copy the JavaScript to the form files (newForm,editForm and etc.)document.getElementsByTagName('Table').item(0).outerHTML= document.getElementsByTagName('Table').item(0).outerHTML.replace(/</g,'<').replace(/>/g,'>'); Tips: if you do not know where to insert the code, look for the following area which contains an OOB JavaScript code Preview:
Comments:The functionality of the JavaScript converts the escape character back, so that the pictures and HTML codes display correctly.
Updates [2009-11-02]: Thanks for Mike Sharp’s idea here: http://social.technet.microsoft.com/Forums/en-US/sharepointcustomization/thread/8b97bc31-f72d-4104-bd40-d8d72a8f7fbf There should be a potential for XSS, and narrow the scope of what gets un-escaped should reduce the risks: For DispForm, NewForm and EditForm pages. using 引用通告此日志的引用通告 URL 是: http://lambertqin.spaces.live.com/blog/cns!E93C48B467E6B3E1!1121.trak 引用此项的网络日志
|
|
|