the only way i can think of is to use a servlet. have the java class defined something like this
and the html code for the button would be
public class SomeClass extends HttpServlet
public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
String pageName req.getParameter("pageName);
I assume you can do the same thing with java server pages but i've never used them so I don't know for sure.
<form action = 'SomeClass' method = 'post'>
<input type = 'hidden' name = pageNumber value = whateverYouWant> //this will be an invisible parameter
<input type = 'submit' value = 'press me'>
the html code for the button works for IE but i don't have netscape so i'm not sure if it's the same in that.