Monday, August 3, 2009

HTML problem?

I have 2 qusetion about some html script. I%26#039;ve changed my host and now i have a different web-site, but my friends know the old addres. what is the html for redirecting from a page to another?(like when they are clicking on oldsitecom they will be automaticly be taken to newsite.com.



The second question is: what is the java script trough people can bookmark my page or make my page their home page?



HTML problem?





To redirect the old page to the new one in five seconds, put this in the %26#039;head%26#039; section%26#039;...



%26lt; meta http- equiv=%26quot;refresh%26quot; content=%26quot;5;url= http ://www.newpage.com/%26quot; %26gt;



As far as bookmarking goes...any user that can%26#039;t bookmark a page is pretty bad. Don%26#039;t mess up your site with Javascript just for them...!!



HTML problem?



You can find many of your answer on dynamicdrive.com website or javascript.com



Good luck



Other Replys:i can%26#039;t recall the code off the top of my head. both are frequent questions on www.irt.org. and, both are javascript solutions.



Other Replys:sorry i dont know ...



Other Replys:For your first question, if you only have HTML, you may do the following. At your old address, you need to put a HTML page up that says: %26#039;You should be redirected in 2 seconds. If not, click here%26#039; where the %26#039;click here%26#039; is a link to your new address (just in case).



Then, you should have this %26lt;meta /%26gt; tag in the %26lt;head%26gt; section:



%26lt;meta http-equiv=%26quot;refresh%26quot; content=%26quot;2;url=http://www.newdomain.com/... /%26gt;



where the number controls how many seconds between redirect and the url can be both absolute and relative.



Now, as for your Javascript question, see the following demo page:



%26lt;html%26gt;



%26lt;head%26gt;



%26lt;title%26gt;Testing Favorites%26lt;/title%26gt;



%26lt;script language=%26quot;javascript%26quot; type=%26quot;text/javascript%26quot;%26gt;



%26lt;!--



function bookmark()



{



if (window.sidebar)



{



//for FF



window.sidebar.addPanel( document.title, location.href, %26quot;%26quot; );



}



else if (window.external)



{



//for IE



window.external.AddFavorite( location.href, document.title );



}



}



//--%26gt;



%26lt;/script%26gt;



%26lt;/head%26gt;



%26lt;body%26gt;



%26lt;a href=%26quot;#%26quot; onclick=%26quot;bookmark(); return false;%26quot;%26gt;Bookmark!%26lt;/a%26gt;



%26lt;/body%26gt;



%26lt;/html%26gt;



Other Replys:well i have the answer for your second question :



Place the following code inside your %26lt;head%26gt; tags



%26lt;a href=%26quot;#%26quot; onclick=%26quot;this.style.behavior = %26#039;url(#default#homepage)%26#039;; this.setHomePage(%26#039;http://%26#039;);%26quot;%26gt;Set as Homepage%26lt;/a%26gt;

No comments:

Post a Comment