Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Dec 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy 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?

  • #2
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    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.

  • #3
    New to the CF scene
    Join Date
    Dec 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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...
    Last edited by brutas; 12-10-2012 at 08:40 PM.

  • #4
    New to the CF scene
    Join Date
    Dec 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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 = "progidXImageTransform.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 = "progidXImageTransform.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 = "progidXImageTransform.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 = "progidXImageTransform.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?!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •