Need Help Converting Embed Script to Iframe - iframe

Can't seem to get the embed code to work on a Sharepoint site page.
> <script id="gnewtonjs" type="text/javascript"
> src="//recruitingbypaycor.com/career/iframe.action?clientId=8a7883d05f1400b3015f2c603ad24f80"></script>
Here's the error I get in Sharepoint when I try to embed on site page:
Sharepoint error

Related

LinkedIn Follow button plugin is opening a blank window

Using LinkedIn's site that creates the scripts for plugins, I created the plugin with the following script:
<script src="https://platform.linkedin.com/in.js" type="text/javascript"> lang: en_US</script>
<script type="IN/FollowCompany" data-id="2922419" data-counter="top"></script>
I tried different things; with the https, without it (as they posted), but whenever I click on the button, it just opens up a blank window. What am I doing wrong?
it is not a big issue if LinkedIn Script is not working fine then just add your own onclick redirect url.i-e onclick="window.open('https://www.linkedin.com/company/{companyID}/');" and then add style="pointer-events:none;" css to its child(i.e LinkedIN scripts) to make its default behavior overridden.
Have you tried including the URL with your button? E.g:
<script type="IN/FollowCompany" data-id="2922419" data-counter="top" data-url="www.yourdomain.com/path/to/your/page"></script>
Replace the link with the page you want to share.

How to use Icon8 webicons in static HTML?

I am trying to embed Icon8 SVG's in my code
This question relates to this website:
https://icons8.com/welovesvg
I linked to the CDN in the head:
<script type="text/javascript" src="//cdn.rawgit.com/icons8/bower-webicon/v0.10.7/angular-webicon.min.js"></script>
And I put this in the HTML:
<webicon icon="material:account-box"/>hello</webicon>
But nothing is showing up...how can I make this work?
They also say to link to their website, as I did.
The file on my URL is at:
http://xuzo.com/icon8.html

Will including these javascript files in the header eliminate Etag errors, and other SEO errors from YSlow?

I have been working on performance lately, and recently ran a YSlow test on my company's asp.net website. I have already set up an IIS7 rule to set expiration dates to 30 days. After researching, I think Yahoo suggests you add tags like this to your head section:
<script src="http://yui.yahooapis.com/2.9.0/build/yahoo/yahoo-min.js" ></script>
<script src="http://yui.yahooapis.com/2.9.0/build/get/get-min.js" ></script>
<script src="http://yui.yahooapis.com/2.9.0/build/yahoo-dom-event/yahoo-dom-event.js">
</script>
<script src="http://yui.yahooapis.com/2.9.0/build/imageloader/imageloader-min.js">
</script>
<script src="http://yui.yahooapis.com/2.9.0/build/cookie/cookie-min.js"></script>
If you see this link, Yahoo's recommendations on how to improve SEO, it seems as if yahoo suggests putting these .js files in your header.
Are these javascript files from yahoo something you should include in your head section? Or are they just unnecessary external .js files that will slow your site down? I just don't understand yahoo's logic behind this. Any guidance to clear this up would be greatly appreciated!
Those files are YUI version 2 (deprecated) YUI3 is the latest, if your website is not using any of these components then you're ok to remove them from HEAD section. If your website is indeed using those YUI2 files then you can get the combined version of all the links above in order to have only 1 script tag and move it to the bottom of your page next to .

Tidying up my ASP.NET project has broken my relative paths

I have just created some directories and tidied up my growing ASP.NET project but it has caused some issues that I can't solve. I have a directory in the root of the project called js and another one called Pages.
In Pages I have a file called MasterPage.master which is a master page. The Pages directory has Default.aspx and some subdirectories of other pages.
I have two main issues. In MasterPage.master I have code like this to reference javascript files:
<script src="js/jquery-ui-1.8.6.custom.min.js" type="text/javascript"></script>
However none of my javascript can be found any more. I tried <script src="/js/jquery-ui-1.8.6.custom.min.js" type="text/javascript"></script> and I tried <script src="~/js/jquery-ui-1.8.6.custom.min.js" type="text/javascript"></script> but it still doesn't work.
The other issue is that I have a menu system written is CSS and that has some strange behaviour. When the page loads the menu works fine. If I navigate to /Pages/Trades/TradeInfo.aspx and then hover over that item the page path now says /Pages/Trades/Trades/TradeInfo.aspx
Why has the Trades directory been added twice?
Have you tried ResolveUrl?
It sure works for the script tags and your anchor tags.
<script src='<%=ResolveUrl("~/Scripts/jquery/ui/jquery-ui-1.8.11.custom.min.js") %>' type="text/javascript"></script>

Is ASP.NET (webforms) Incompatible with Google Website Optimizer Multivariate Testing?

I've been stuggling all morning trying to get a multivariate test going in google website optimizer.
I've copy and pasted the header/footer code into the pages, and setup a basic page section just to see that everything is working.
When I try to validate the code its failing saying
"No sections detected on test page
TestSectionName - Unexpected or missing characters - Line: 422 Expected: </noscript>"
The silly thing is that the output is clearly there (I have used an asp literal to get around the asymetric noscript tag) and can clearly see it in the source as follows:
<script>utmx_section("TestSectionName")</script><h1>Buy This Product!</h1></noscript>
I've already tried disabling/removing the existing google analytics code in the site on the off chance that was conflicting with it with no luck.
I think there might be some incompatibility with the asp.net framework and this WSO framework. I was able to use exactly the same code saved into a raw html file with no asp.net/page content and have it validate ok.
e.g.
<html><head></head><body>
<!-- Google Website Optimizer Control Script -->
<script>
function utmx_section(){}function utmx(){}
(function(){var k='xxxxx',d=document,l=d.location,c=d.cookie;function f(n){
if(c){var i=c.indexOf(n+'=');if(i>-1){var j=c.indexOf(';',i);return c.substring(i+n.
length+1,j<0?c.length:j)}}}var x=f('__utmx'),xx=f('__utmxx'),h=l.hash;
d.write('<sc'+'ript src="'+
'http'+(l.protocol=='https:'?'s://ssl':'://www')+'.google-analytics.com'
+'/siteopt.js?v=1&utmxkey='+k+'&utmx='+(x?x:'')+'&utmxx='+(xx?xx:'')+'&utmxtime='
+new Date().valueOf()+(h?'&utmxhash='+escape(h.substr(1)):'')+
'" type="text/javascript" charset="utf-8"></sc'+'ript>')})();
</script>
<!-- End of Google Website Optimizer Control Script -->
<script>utmx_section("TestSectionName")</script><h1>Buy This Product!</h1></noscript>
<!-- Google Website Optimizer Tracking Script -->
<script type="text/javascript">
if(typeof(_gat)!='object')document.write('<sc'+'ript src="http'+
(document.location.protocol=='https:'?'s://ssl':'://www')+
'.google-analytics.com/ga.js"></sc'+'ript>')</script>
<script type="text/javascript">
try {
var gwoTracker=_gat._getTracker("UA-xxxxx-1");
gwoTracker._trackPageview("/xxxxx/test");
}catch(err){}</script>
<!-- End of Google Website Optimizer Tracking Script -->
</body>
</html>
After all of this I am wondering if there is
a) anyone out there using asp.net with multivariate testing successfully
b) a known incompatibility with something in asp.net
c) known "donts" when it comes to coding with WSO multivariate testing
d) something really obvious I am missing?
I have used Google Website Optimizer multivariate tests on an ASP.NET website without any problem.
Have you tried putting </noscript> on its own line? I think I always put it on a blank line after the default section.

Resources