X
Twitter Facebook LinkedIn
Win prizes like Hard Disk, Pen drives, T-Shirts etc. Click here for more information

JavaScript in Content Editor WebPart SharePoint

08-Mar-2012 6:05 AM
Views 5347
Categories : WebPart

Share This


About Author:

I am Bijay Kumar Sahoo (Biju), from Orissa, India. Here in the IT industry for more than 7+ years and during these days I have enjoyed working with Microsoft Technologies such as SharePoint 2013/2010, MOSS 2007, Asp.Net, C#.Net, Sql Server, Ajax, jQuery etc. Currently working with Hewlett-Packard (HP) in Bangalore. During these period I worked in various concepts like Workflow, InfoPath, Custom web part developement, Search, SharePoint customization like master page and page layouts. Apart from that I have also also work in both SharePoint server object model as well as client object model.... view full profile


Comments


13-Apr-2012 7:34 AM Posted By Grahame Hambleton Said:

Hi

 

Thanks for the article but I have a problem. I am using a jquery plugin (lightbox) and it has small images it uses for icons. I t expects these images to be in the "images" folder and this is fine if I use a conventional web app, Howvwe using the Content Editor method you have described I cannot get the images to show up because I don't know where to put them. I have tried making a folder called iamges in a document library beneath the one which holds the javascript file but to no avail. I suspect they need to go somewhere in the layouts folder?

 

Can you advise?

 

TIA

 

Grahame


23-Apr-2012 12:24 PM Posted By Ashish Mishra Said:

Hello TIA ,

1. You can go to View All Site Contents page from Site Setting.

2. Add your images under Images Library. Best Practice will be create a seperate folder in Images Lib with unique name and add your images under that folder.

3. Use the images path in your Content Editor web part JS or anywhere to access them. Prefer using relative paths.

Follow me at https://twitter.com/#!/707Mishra

 


23-Apr-2012 12:30 PM Posted By Ashish Mishra Said:

Hello folks,

1. Make a note - "Do Not Add anything on File System (in layouts folder) unless you are very sure about it as it will effect the whole farm."

2. You can Add your javascripts and other files in Documents Folder and refer that path in Content Editor Web part.

 

Follow me at https://twitter.com/#!/707Mishrav


  • To insert images, Upload images here or you can use flickr or picasa to upload images. After that paste the image url in the editor image dialog box.