![]() |
Problem with JavaScript and SP2010
Hello,
I am trying to use this very simple JavaScript code from here: http://www.javascriptkit.com/script/...bleslide.shtml I simply want to have 4 pictures moving and hyperlinked with the respective links that are opening in new windows. I am using this in SharePoint 2010 by copy and paste the code in content editor web part. So far so good. It works. The problem is after the code is entered and working the page starts to load with a delay and cannot be scrolled anymore. Also when I try to edit the page or edit the web part - the edit function doesn’t work and displays “error on page”. Can you help me? |
i would advise not posting the code into a content web editor web part. put the code in an external file , save it in your site assets list folder, and reference a link to the script in the content web part instead.
in sp2010 if you paste code in that kind of webpart, sp2010 does funky stuff to it unfortunately. |
Thanks DanInMa,
I did it just like you advised but the result is exactly the same. my SP site is intranet company site if that gives more info... |
Finally I found some solution with this script:
</SCRIPT> <SCRIPT TYPE="text/javascript"> <!-- SLIDES = new slideshow("SLIDES"); SLIDES.timeout = 4000; SLIDES.prefetch = -1; SLIDES.repeat = true; s = new slide(); s.src = "http://ent52.sharepoint.hp.com/teams/lean_assessment_tool/Pictures/See%20Q%20policy.png"; s.text = unescape(""); s.link = "http://intranet.hp.com/panhp/Quality/Pages/index.aspx"; s.target = "_blank"; s.attr = "width:420,height:230"; s.filter = "progid:DXImageTransform.Microsoft.Slide()"; SLIDES.add_slide(s); s = new slide(); s.src = "http://ent52.sharepoint.hp.com/teams/lean_assessment_tool/Pictures/See%20Org%20and%20Proc.png"; s.text = unescape(""); s.link = "http://ent52.sharepoint.hp.com/teams/lean_assessment_tool/SitePages/HP%20EMEA%20processes%20colored.aspx"; s.target = "_blank"; s.attr = "width:420,height:230"; s.filter = "progid:DXImageTransform.Microsoft.Slide()"; SLIDES.add_slide(s); s = new slide(); s.src = "http://ent52.sharepoint.hp.com/teams/lean_assessment_tool/Pictures/See%20New%20Q%20site.png"; s.text = unescape(""); s.link = "http://intranet.hp.com/panhp/Quality/Pages/index.aspx"; s.target = "_blank"; s.attr = "width:420,height:230"; s.filter = "progid:DXImageTransform.Microsoft.Slide()"; SLIDES.add_slide(s); s = new slide(); s.src = "http://ent52.sharepoint.hp.com/teams/lean_assessment_tool/Pictures/See%20HP%20Lifecycle.png"; s.text = unescape(""); s.link = "http://ent52.sharepoint.hp.com/teams/lean_assessment_tool/SitePages/Quality%20lifecycle%20Home.aspx"; s.target = "_blank"; s.attr = "width:420,height:230"; s.filter = "progid:DXImageTransform.Microsoft.Slide()"; SLIDES.add_slide(s); if (false) SLIDES.shuffle(); //--> </SCRIPT> <P> The problem now is when I click to open a link in new window it opens new window but that window cannot be maximized (has fixed size!). How to fix that?! |
| All times are GMT +1. The time now is 01:50 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.