Solved

sharepoint 2010 include external metrojs in webpart - javascript problem

Posted on 2013-12-03
1
568 Views
Last Modified: 2013-12-10
Hello all,

I'm trying to create a windows8 lookalike for our intranet sharepoint (2010).
I am using metroJS for it (www.drewgreenwell.com/projects/metrojs¿).

Everything is fine, except for the linking part.

When I create my demo page in sharepoint, the links do not work.
When I take a look at the source of the page and save the relevant part locally ('out of sharepoint'), it DOES work.

extract of the HTML code:
<div class="tiles tile-group four-wide">
  <div class="tile-strip four-wide">
    <div id="ctl00_m_g_98183768_fb81_4583_befe_b0ee4504cff9_ctl00_ID1" class="live-tile two-wide emerald" data-mode="slide" data-new-window="true" data-link="http://capricatwo:81">
      <div><p>registrations site</p><span class='tile-title'>registrations</span></div>
      <div><img src='http://capricatwo:81/images/our_logo.gif' /><span class='tile-title'>regs logo</span></div>
    </div>
  </div>
</div>

Open in new window


The 'data-link='-part serves as link. This works on a standalone page but not as part of a webpart in sharepoint.

The links to MetroJS javascript and css are included in the webpart itself.
The link to JQuery is covered in the master page.

Has someone an idea what is the cause of this behaviour or how I can fix this?

Thanks,

     Paul
0
Comment
Question by:paeep
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
paeep earned 0 total points
ID: 39708199
The problem was not in the code.

I just had to replace the

<Sharepoint:ScriptLink ... />

tag with the good old html version: <script type ... />

I don't know why and what's the difference, it just works now...
0

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question