WebmastersGratis
M-am chinuit, m-am straduit...VOI DECIDETI ***Nu ezitati sa cereti ajutorul!!!!***
Lista Forumurilor Pe Tematici
WebmastersGratis | Inregistrare | Login

POZE WEBMASTERSGRATIS

Nu sunteti logat.
Nou pe simpatie:
mimy_glacier 24 ani
Femeie
24 ani
Prahova
cauta Barbat
26 - 47 ani
WebmastersGratis / Tutoriale / JavaScript  
Autor
Mesaj Pagini: 1
WebmasterForo
Administrator

Inregistrat: acum 19 ani
Useful Scripts


Custimizing Buttons


Though this is not java script and is really CSS, you might need this to custimize your refresh, back, and forward button. Just put this code in the head section (near the end is best). Change the #000000 code to whatever color you want your button to be. Where it said "FONT" put whatever font you want. (verdana or tahoma is best). You don't need a background but if you want one reeplace the "none" by the url of the image. The best border width is 1, but you may change it.

input, textarea
{ background: none;
font-family: FONT;
font-size: 12;
color: #000000;
border-style: solid;
border-color: #000000;
border-width: 1pt}

Refresh

Here is a code for a refresh button. Relace "TEXT HERE" by whatever word you want to use for the refresh button.

Code:

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin 
document.write('<form><input type=button value="TEXT" onClick="parent.history.go()"></form>') 
//  End -->
</script>

To center it, just simply add the center code. So then the refresh code will look like tis:

Code:

<center><SCRIPT LANGUAGE="JavaScript">
<!-- Begin 
document.write('<form><input type=button value="TEXT" onClick="parent.history.go()"></form>') 
//  End -->
</script></center>

Back

< Again like the directions above, replace the "TEXT" by whatever word you want your back button to represent.

Code:

<INPUT TYPE="button" VALUE="TEXT" onClick="parent.history.back()"> ||

If you want to center it, simply add the begin center code to the beginning of the code and the end center code to the end of the java script.
Forward

Again like the directions above, replace the "TEXT" by whatever word you want your back button to represent. If you want to center it, simply add the begin center code to the beginning of the code and the end center code to the end of the java script.

Code:

<INPUT TYPE="button" VALUE="Fwd.-->" onClick="parent.history.forward()">

Add to Favorites

Put this code in the HEAD section or the BODY section (must be above the navigation with the links). Where it saids 'URL' put you link there. Where it said "URL TITLE" put your site name there. Do not edit the rest!

Code:

<form>
<script language="JavaScript1.2">

var bookmarkurl="http://midniteanime.simply-torn.net/"
var bookmarktitle="MidniteAnime"

function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}
</script>
</form>

Okay now that you have that in, now to put a "add to favorites" link (in the navigation, below the code) simply put this code in and where it saids "TEXT" put whatever word you want your link to say.

Code:

<a href="javascript:addbookmark()">TEXT</a>



_______________________________________
Interesant numai pe
    *  Hot news (ShowBiz)   * Search Engine Optimization (SEO)
    *  Tutoriale                  * Utile in afaceri! Bine de stiut.

pus acum 19 ani
   
Pagini: 1  

Mergi la