Home / Web Development / CSS / Redirect the page using Javascript – HTML or PHP

Redirect the page using Javascript – HTML or PHP

Hi Friends,
We can redirect the current page to some other new page using Javascript in HTML or PHP page. The window.location object can be used to get the current page address to redirect new page. This operations performe in html page like on page load, onclick event etc. Here I explain redirect the page on page load, redirect the page with time delay, redirect the page with time delay and confirm the alert box and redirect the page on button click.

– – – >Redirect the page on page load

– – – >Redirect the page with time delay

– – – >Redirect the page with time delay and confirm the alert box

– – – >Redirect the page on button click

– – – >Redirect the Page Only using Search Engines like yahoo,google etc
In above code, the page redirection at particular event or operation. Here I show how to redirect the page or domain to some other page during the page call or search by using search engines. This function perform by using javascript. First check, the call or request from which search engines (AOL|GOOGLE|YAHOO|BING). If request from these specified search enginee then redirect the page using ‘window.location.href’.

– – – >Redirect page on Checkbox check

Create one checkbox and want to redirect a page on some particular link when checkbox is checked.

Create one checkbox

Jquery snippet to redirect a page to http://prittytimes.com/ when user checked a checkbox.

OR

If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.

Leave a Reply

Your email address will not be published. Required fields are marked *

Social Media Auto Publish Powered By : XYZScripts.com