So Let’s begin.
Go to Blogger -> Blog to be redirected -> Template -> Edit HTML.
You will get a box with a lot of text. Use one of the following methods to redirect :
Split Name in PHP and Javascript
Suppose We have a user named Paul Steve Panakkal (my cousin). To separate the first name, middle name and last name you can do the following in PHP :... [READ MORE]
Cross Origin Communication – window.postMessage
That’s because of the Cross Domain Policy that makes this not possible. But it’s possible since Javascript introduced postMessage function.
Suppose you want to call a function on an cross domain iframe with id monu. Let the function be subins(). Here’s how to do it using postMessage technic.
... [READ MORE]Loading Bar until page loads completely using Javascript
This tutorial was requested by Sumit. In this tutorial I’m going to tell how to put up a loading screen until the page has loaded completely.
The loading bar will fade out when loading is completed.
This code will work for all sites including Blogger Blogs, WordPress Blogs except Dynamic Views Template of **Blogger **(because it uses ajax loading). You can change the image if you want. I have created an image of my own :
... [READ MORE]Setting Iframe height to its content height using Javascript
function getDocHeight(doc) {
... [READ MORE]
doc = doc || document;
var body = doc.body, html = doc.documentElement;
var height = Math.max( body.scrollHeight, body.offsetHeight,
html.clientHeight, html.scrollHeight, html.offsetHeight );
return height;
}
function setIframeHeight(id) {
var ifrm = id;
var doc = ifrm.contentDocument? ifrm.contentDocument: ifrm.contentWindow.document;
ifrm.style.visibility = ‘hidden’;
ifrm.style.height = "10px"; // reset to minimal height in case going from longer to shorter doc
// some IE versions need a bit added or scrollbar appears
ifrm.style.height = getDocHeight( doc ) + 4 + "px";
ifrm.style.visibility = ‘visible’;
}
Javascript code Compressor Tool
Go to http://blimptontech.com/ to see the compressor in action.
You have three options:
- Paste Code and Compress
- Compress code in files
- Compress Multiple files into one.
It’s a great tool and it will help you reduce the file size up to 100 KB. This site is similar to the JsCompressor tool @ http://jscompress.com.
Fix: Dynamic Views failed to load properly
How to redirect users to a page in PHP
The following example will redirect user to http://subins.hp.af.cm
Or you can use the normal Javascript :
window.location=’http://subins.hp.af.cm’;"; ?>
What’s the difference ?
header function is called in server itself not when the page reaches the browser. So no content will load, instead the client’s page will be redirected to the specified url.
How To Integrate Disqus Into Blogger Dynamic Views
Disqus works in normal Blogger template but won’t work in Dynamic Views because it don’t support HTML/Javascript widget. But you can edit the contents in head tag of Template and I found a way to integrate the Disqus commenting system in to Blogger. I’m gonna show you how to do that.
Works On
- Sidebar
- Classic
- Flipcard
- Magazine
- Mosaic
- Snapshot
- Timeslide
Disadvantages
On Classic Templates Disqus will only be available for the first post, because they won’t allow you to put more than 1 Disqus Comment box on a page
... [READ MORE]Check whether a site is XSS vulnerable or not.
Instead of the value in one of the GET parameter use the following value :
... [READ MORE]
XSS Vulnerability checker by Subin Siby