Click to See Complete Forum and Search --> : is it possible to javascript "back | next" menu
zulez
11-24-2003, 10:26 AM
Hi there
I think I need a simple Javascript menu that can calculate - FIRST | BACK | NEXT | LAST - which allows the user to click and pull in next file and/or scroll back and forth.
Is this possible in javascript?
thank you
John
Gollum
11-24-2003, 10:47 AM
Not quite sure what you mean here.
Do you mean back/forward like the browser buttons? (if so, yes; use history.go() )
Or do you have some kind of catalogue/menu/or something?
In which case its a little more involved, but still yes.
zulez
11-24-2003, 04:03 PM
yes, history.go() might work - I will try - thabks
zulez
11-24-2003, 05:48 PM
Yes I want a back/forward javascript browser buttons.
I have looked around for information and have some questions would like to ask:
Q. Is history.go() compatible in IE?
Q. I made a button with <INPUT TYPE="button" VALUE="Go" onClick="history.go(-2)"> how do I hook it in?
Q. do I have to make a file called allmyfiles.js that contains file names and link?
thanks for your help
john
zulez
11-24-2003, 07:55 PM
guess I need to define javascript in header :
</style>
<script language="javascript" src="history.go"></script>
huh
well I have to log off now and try all this.
thanks
john
Paul Jr
11-24-2003, 08:23 PM
<form name="menu" action="" method="post">
<input type="button" name="back" value="Back" onClick="JavaScript:history.go(-1);">
</form>
If I'm not mistaken, that should work.
zulez
11-25-2003, 05:29 PM
feel like a bit of a goose but I have worked it out so I'm truckin' but of course now that I have the Back button working I want the forward one to work.
Of course the Forward button won't work unless you've already been there (since it is from the History cache) so what I want is to increment to the Next number.
So if I label my files from 1 to 1000 the 'next' page is a higher number. So that would be something like : <form name="menu" action="" method="post">
<input type="button" name="forward" value="forward" onClick="java script:history.go(1+1);">
</form>
(1)+1 or something
john
zulez
11-25-2003, 08:30 PM
<form>
<input type="text" size="3" name="amount" value="5">
<input type="button" value="+" onclick="javascript:this.form.amount.value++;">
<input type="button" value="-"onclick="javascript:this.form.amount.value--;">
</form>
the "+" and "-" buttons to move the value up or down
now I have to join the two scripts together to enable: forward to next highest number
john
zulez
11-25-2003, 09:06 PM
<form name="menu" action="" method="post">
<input type="button" name="forward" value="forward" onClick="java script:history.go(1);">
</form>
===
<input type="text" size="3" name="amount" value="1">
<input type="button" value="+" onclick="javascript:this.form.amount.value++;">
=============
so this is what I've got at this time...
<form name="menu" action="" method="post">
<input type="button" name="forward" value="forward" input type="hidden" value="+" onClick="javascript:history.go(this.form.amount.value++);">
</form>
just a wild guess
thanks for help
:-)