Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-10-2012, 07:01 AM   PM User | #1
brutas
New to the CF scene

 
Join Date: Dec 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
brutas is an unknown quantity at this point
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?
brutas is offline   Reply With Quote
Old 12-10-2012, 03:27 PM   PM User | #2
DanInMa
Senior Coder

 
DanInMa's Avatar
 
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,307
Thanks: 12
Thanked 204 Times in 204 Posts
DanInMa is on a distinguished road
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.
__________________
- Firebug is a web developers best friend! - Learn it, Love it, use it!
- Validate your code! - JQ/JS troubleshooting
- Using jQuery with Other Libraries - Jslint for Jquery/other JS library users
DanInMa is offline   Reply With Quote
Old 12-10-2012, 07:36 PM   PM User | #3
brutas
New to the CF scene

 
Join Date: Dec 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
brutas is an unknown quantity at this point
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 07:40 PM..
brutas is offline   Reply With Quote
Old 12-11-2012, 10:30 PM   PM User | #4
brutas
New to the CF scene

 
Join Date: Dec 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
brutas is an unknown quantity at this point
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?!
brutas is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:53 PM.


Advertisement
Log in to turn off these ads.