TinyPortal

Development => Block Codes => Topic started by: gerrymo on March 13, 2006, 06:27:59 PM

Title: Javascript Buttons
Post by: gerrymo on March 13, 2006, 06:27:59 PM
The first is a back button. This will take you back to the page you came from (any page, any site). It uses you browser history to see what your previous page was.


<FORM>
<INPUT type="button" value="Click here to go back" onClick="history.back()">
</FORM>


Just change value= to your wording

==========================================================

This one can be used to visit any page (change the url to suit you).


<FORM>
<INPUT type="button" value="Click Here" name="button6" onClick="window.location='index.php?cat=138'">
</FORM>


Just alter value= and window.location= to suit your needs.

They can be used in blocks an aritcles.
Title: Re: Java Buttons
Post by: crip on March 13, 2006, 06:31:52 PM
this one is handy..ty gerrymo ..
Title: Re: Java Buttons
Post by: gerrymo on March 13, 2006, 07:02:10 PM
Knowing your sense of humour Crip, try one of the back buttons, but add a negative number into the brackets like history.back(-12)

That will send the person back 12 pages, even if it is off your own site. Not handy for that much, but good for a wind up.
Title: Re: Java Buttons
Post by: crip on March 13, 2006, 07:09:02 PM
when you say java do you mean javascript or just java back button applet?
Title: Re: Java Buttons
Post by: gerrymo on March 13, 2006, 07:19:07 PM
Javascript.
Title: Re: Java Buttons
Post by: crip on March 13, 2006, 07:22:42 PM
ok..cuz I jut don't like java Applets much..i'll tryer out. 8)
Title: Re: Javascript Buttons
Post by: oneway on July 24, 2006, 02:49:07 PM
Quote from: gerrymo on March 13, 2006, 06:27:59 PM
The first is a back button. This will take you back to the page you came from (any page, any site). It uses you browser history to see what your previous page was.


<FORM>
<INPUT type="button" value="Click here to go back" onClick="history.back()">
</FORM>


Just change value= to your wording

==========================================================

This one can be used to visit any page (change the url to suit you).


<FORM>
<INPUT type="button" value="Click Here" name="button6" onClick="window.location='index.php?cat=138'">
</FORM>


Just alter value= and window.location= to suit your needs.

They can be used in blocks an aritcles.

An interesting snippet. Just one thing though, value= doesn't change the button when I do it. It always says "Click here" no matter what text I put in for 'value'.
Title: Re: Javascript Buttons
Post by: Muziek4um on August 09, 2006, 12:29:15 PM
ANy idea what i'm doing wrong in de code below?
It should open a flashplayer in a popup screen:

<a href="JavaScript:popupwin2('http://www.ongekendtalent.nl/MP3Player/MP3Player2.asp?berichtID=98820&clubID=10785', 'Player', 290, 66);" onmouseover="javascript:swapimage('clubmp3datum98820','http://www.ongekendtalent.nl/_img/icoonmp32.gif')" onmouseout="javascript:swapimage('clubmp3datum98820','http://www.ongekendtalent.nl/_img/icoonmp31.gif')" onClick="javascript:swapimage('clubmp3datum98820','http://www.ongekendtalent.nl/_img/icoonmp32.gif')" class="mp3"><img src="http://www.ongekendtalent.nl/_img/icoonmp31.gif" width="20" height="13" alt="" border="0" name="clubmp3datum98820" align="absmiddle" />Bamboo</a>
<br><a href="JavaScript:popupwin2('http://www.ongekendtalent.nl/MP3Player/MP3Player2.asp?berichtID=98808&clubID=10785', 'Player', 290, 66);" onmouseover="javascript:swapimage('clubmp3datum98808','http://www.ongekendtalent.nl/_img/icoonmp32.gif')" onmouseout="javascript:swapimage('clubmp3datum98808','http://www.ongekendtalent.nl/_img/icoonmp31.gif')" onClick="javascript:swapimage('clubmp3datum98808','http://www.ongekendtalent.nl/_img/icoonmp32.gif')" class="mp3"><img src="http://www.ongekendtalent.nl/_img/icoonmp31.gif" width="20" height="13" alt="" border="0" name="clubmp3datum98808" align="absmiddle" />Searchin</a>
<br><a href="JavaScript:popupwin2('http://www.ongekendtalent.nl/MP3Player/MP3Player2.asp?berichtID=98807&clubID=10785', 'Player', 290, 66);" onmouseover="javascript:swapimage('clubmp3datum98807','http://www.ongekendtalent.nl/_img/icoonmp32.gif')" onmouseout="javascript:swapimage('clubmp3datum98807','http://www.ongekendtalent.nl/_img/icoonmp31.gif')" onClick="javascript:swapimage('clubmp3datum98807','http://www.ongekendtalent.nl/_img/icoonmp32.gif')" class="mp3"><img src="http://www.ongekendtalent.nl/_img/icoonmp31.gif" width="20" height="13" alt="" border="0" name="clubmp3datum98807" align="absmiddle" />Angel Eyes</a>
<br><a href="http://www.ongekendtalent.nl/clubs/clubstek/clubstek.asp?clubID=10785&prikbordID=78196&stem=poll" title="Powered By ongekendtalent.nl" target="_blank"><font color="#0F0F0F" size="1"><i>Powered by OngekendTalent.nl</i></font></a>
Title: Re: Javascript Buttons
Post by: Muziek4um on August 26, 2006, 11:24:13 AM
Already got it.  :laugh:
Was a matter of putting this at the top of the script.

<script language="javascript" src="http://www.ongekendtalent.nl/_js/raamwerk.js"></script>

:2funny: :up:
Title: Re: Javascript Buttons
Post by: DJRONY on July 22, 2009, 12:30:15 PM
so how to make colorful and bigger buttons in JavaScript? I want to use some in my site