Solved

sharepoint 2010 include external metrojs in webpart - javascript problem

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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 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…

816 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