Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_jsp thread: HELP!!!! Passing parameter to a JSP page


Message #1 by "Liselotte Hjelmbjerg" <hjelmb@s...> on Mon, 11 Mar 2002 11:07:34
Thank you very very much Naumann 
It is working now.
Liselotte


> Yes. First you directly call Svar,jsp??id=1 and next you call the 
function
> svar(...). If you are doiung something in the function, then you can 
simply
> add the redirection code inside that function. then you wil lhave to call
> only svar(...). In svar(), you can submit to the Svar.jsp using...
> your_form_name.action="Svar.jsp?id=1"
> your_form_name.submit();
> 
> ----- Original Message -----
> From: "Liselotte Hjelmbjerg" <hjelmb@s...>
> To: "Pro_JavaServer_Pages" <pro_jsp@p...>
> Sent: Monday, March 11, 2002 11:53 AM
> Subject: [pro_jsp] Re: HELP!!!! Passing parameter to a JSP page
> 
> 
> > I have tried to use query string, is this how i should write it:
> >
> > <a href="#" onClick= "Svar.jsp?id=1 svar('./Svar.jsp', 300, 600)">
> >
> > The function svar() opens another window, is it a problem that I do two
> > things on onClick?
> >
> > Liselotte Hjelmbjerg
> >
> >
> >
> > > Use query string. If the page you are redirecting to is target.jsp, 
then
> > > redirect to target.jsp?id=1.
> > > Use request.getParameter("id") on target.jsp.
> > >
> > > ----- Original Message -----
> > > From: "Boney Sze" <send2boney@y...>
> > > To: "Pro_JavaServer_Pages" <pro_jsp@p...>
> > > Sent: Monday, March 11, 2002 4:05 PM
> > > Subject: [pro_jsp] Re: HELP!!!! Passing parameter to a JSP page
> > >
> > >
> > > > you can place your 'id=1' in a session variable using
> > > > setAttribute() and then retrieve its value on another
> > > > jsp page using getAttribute()
> > > >
> > > > hope that helps.
> > > >
> > > > Boney Sze
> > > >
> > > >
> > > >
> > > > --- Liselotte Hjelmbjerg <hjelmb@s...> wrote:
> > > > > Hello everybody
> > > > >
> > > > >  I am using javascript to asign a value to a
> > > > > parameter:
> > > > >  <a href ......... onClick="id=1">
> > > > >  And now my problem is, that i want to acces this
> > > > > parameter in another
> > > > >  jsp page, like this:
> > > > >
> > > > >  <% String sql= "select...........where ID="+id; %>
> > > > >
> > > > > Can anybody help me
> > > > >
> > > > > Liselotte Hjelmbjerg
> > > > $subst('Email.Unsub').
> > > >
> > > >
> > > > __________________________________________________
> > > > Do You Yahoo!?
> > > > Try FREE Yahoo! Mail - the world's greatest free email!
> > > > http://mail.yahoo.com/
> > > >
> $subst('Email.Unsub').
> > > >
> > >
> >
> >
> 

  Return to Index