Solved

sharepoint 2010 include external metrojs in webpart - javascript problem

Posted on 2013-12-03
1
526 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
1 Comment
 

Accepted Solution

by:
paeep earned 0 total points
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
advertisement module in core php 4 78
HTML page and JavaScript 2 48
Css issue on scroll 1 17
Need a good Angular tutorial 5 0
In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now