PDA

View Full Version : Button Help



Mekhu
September 12th, 2001, 01:19
Hey guys.

I am doing a site for my dads friends and he wants a couple of buttons to do things like the IE and Netscape back/forward buttons do...any clue how I do this?

Basically so someone could hit a back button (image) and go back as if they hit the back button on the browser.

Thanks,

Mekhu

308holes
September 12th, 2001, 11:42
I think this is right


<FORM>
<INPUT type="button" onClick="JavaScript:history.forward()" value="forward">
<INPUT type="button" onClick="JavaScrit:history.back()"value="back">
</FORM>

Mekhu
September 12th, 2001, 14:37
Thanks man,

Mekhu

308holes
September 12th, 2001, 18:15
heres a script to change the color to


<script language="JavaScript">
<!--
if(document.all){
document.write('<style type="text/css">');
document.write('input { background-color: gray; border: #000000; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; color: #000000}');
document.write('</style>');
}
//-->
</script>

Mekhu
September 12th, 2001, 19:12
I changed em already :P

You can see it here, www.edupraxis.ca/new/

Thanks,

Mekhu

308holes
September 12th, 2001, 20:42
Can i get the search script and scrolling script from you??

Mekhu
September 12th, 2001, 23:35
308...you got ICQ?

ICQ me at 44906812 and I will give you whatever you need.

Thanks,

Mekhu

LeX
September 13th, 2001, 08:24
308holes... just wondering, why do you like coding HTML in JavaScript so much? :confused: There really isn't a need to complicate simple things.. and what if the visitor disabled JavaScript?

308holes
September 13th, 2001, 12:05
because I like javascript and i dont know any other ways i have only been doing this for about 4month may be more :biggrin2:

LeX
September 14th, 2001, 07:34
You don't know other ways of doing it?!!?! :eek:

Your original code
<script language="JavaScript">
<!--
if(document.all){
document.write('<style type="text/css">');
document.write('input { background-color: gray; border: #000000; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; color: #000000}');
document.write('</style>');
}
//-->
</script>


Your code simplified
<style type="text/css">
input {
background-color: #123456;
border: #123456 solid 1px;
font-family: Verdana;
font-size: 14px;
color: #123456;
}
</style>


Get it now? All those document.write if elseif ---- were completely uneccessary.

Mekhu
September 14th, 2001, 10:39
lol.

Lex you seem to have some built up anger :P I also did not know that.

So thank you for teaching us noobies somethin :P

Mekhu

LeX
September 14th, 2001, 11:40
Originally posted by Mekhu
Lex you seem to have some built up anger :P I also did not know that.I'm not angry... I was kinda, er, "shocked". ;)

308holes
September 14th, 2001, 13:33
LeX as i have said befor I have only been doing thins for like 6month with no help i might add so i only know the hard ways :-(
but thank for the help

meow
September 14th, 2001, 14:42
Newbies writing their pages totally in JavaScript? That was something!
You guys will find HTML very easy!:biggrin2:

Mekhu
September 14th, 2001, 18:18
lol....

I wouldn't really call myself a newbie.

Thing is, I can only really use jscript because most of the sites I do are favors and those people are to damn cheap to pay for a host that can support SSI, CGI, etc.

Mekhu

meow
September 14th, 2001, 18:33
Was you that said it. :)

Mekhu
September 14th, 2001, 20:43
tru dat :P

Mekhu