onclick of row of table the value should be in textbox in jsp

  • Follow


Hello All, I am new to jsp , trying very hard ,bot to no avail. Onclick of row of table (html table) on first jsp the value in therow should be displayed in the textbox on second page in jsp.The table consists of records  from database.Is it  that we have to get the rowindex of table and the pass thecorresponding value  related to rowindex to the textbox?And  should the records from database should be stored in arraylistand then display in table?How do I do it? If anyone could pass the code or related link will behelpful.Thanks
0
Reply savita.raskar (11) 4/13/2007 10:23:25 AM

savita wrote:> Hello All,> >  I am new to jsp , trying very hard ,bot to no avail.> >  Onclick of row of table (html table) on first jsp the value in the> row should be displayed in the textbox on second page in jsp.> The table consists of records  from database.> > Is it  that we have to get the rowindex of table and the pass the> corresponding value  related to rowindex to the textbox?> And  should the records from database should be stored in arraylist> and then display in table?> > How do I do it? If anyone could pass the code or related link will be> helpful.> > Thanks> This is a HTML question. By the way which value in the first jsp page are you talking about? If your table has multiple columns and you click on a row, then which value are you expecting to pass to second jsp page?What I would do, is put an onclick event on the table row and set value of window.href to your second page url and would encore the variable in the url. On the second page, get it as a GET var.Sanjay
0
Reply Sanjay 4/13/2007 12:51:46 PM


On Apr 13, 5:51 pm, Sanjay <sanjay.deb...@gmail.invalid.com> wrote:
> savita wrote:
> > Hello All,
>
> >  I am new to jsp , trying very hard ,bot to no avail.
>
> >  Onclick of row of table (html table) on first jsp the value in the
> > row should be displayed in the textbox on second page in jsp.
> > The table consists of records  from database.
>
> > Is it  that we have to get the rowindex of table and the pass the
> > corresponding value  related to rowindex to the textbox?
> > And  should the records from database should be stored in arraylist
> > and then display in table?
>
> > How do I do it? If anyone could pass the code or related link will be
> > helpful.
>
> > Thanks
>
> This is a HTML question. By the way which value in the first jsp page
> are you talking about? If your table has multiple columns and you click
> on a row, then which value are you expecting to pass to second jsp page?
>
> What I would do, is put an onclick event on the table row and set value
> of window.href to your second page url and would encore the variable in
> the url. On the second page, get it as a GET var.
>
> Sanjay- Hide quoted text -
>
> - Show quoted text -



Hello  All,

    I will redifined my problem.

0
Reply savita 4/14/2007 10:09:40 AM

On Apr 14, 3:09 pm, "savita" <savita.ras...@gmail.com> wrote:
> On Apr 13, 5:51 pm, Sanjay <sanjay.deb...@gmail.invalid.com> wrote:
>
>
>
>
>
> > savita wrote:
> > > Hello All,
>
> > >  I am new to jsp , trying very hard ,bot to no avail.
>
> > >  Onclick of row of table (html table) on first jsp the value in the
> > > row should be displayed in the textbox on second page in jsp.
> > > The table consists of records  from database.
>
> > > Is it  that we have to get the rowindex of table and the pass the
> > > corresponding value  related to rowindex to the textbox?
> > > And  should the records from database should be stored in arraylist
> > > and then display in table?
>
> > > How do I do it? If anyone could pass the code or related link will be
> > > helpful.
>
> > > Thanks
>
> > This is a HTML question. By the way which value in the first jsp page
> > are you talking about? If your table has multiple columns and you click
> > on a row, then which value are you expecting to pass to second jsp page?
>
> > What I would do, is put an onclick event on the table row and set value
> > of window.href to your second page url and would encore the variable in
> > the url. On the second page, get it as a GET var.
>
> > Sanjay- Hide quoted text -
>
> > - Show quoted text -
>
> Hello  All,
>
>     I will redifined my problem.- Hide quoted text -
>
> - Show quoted text -

Hello All,

            I  will redefined my problem . I am working on jsp.
      I have one jsp page on which table is displayed. The table
consists of 2 columns,
first col consists radio button second col consists dept code.
What I want is onclick of any radio button the value of dept code
should be displayed in textbox
on second jsp.

The first jsp name is department.jsp.
The second jsp is indent.jsp.

In department.jsp I have <table> of html which displays dept code.The
table is in form tag
<form name="frm" action="indent.jsp">
I have submit button which calls indent.jsp
Is my approach  correct?

Thanks


0
Reply savita 4/14/2007 10:20:11 AM

savita wrote:> >             I  will redefined my problem . I am working on jsp.>       I have one jsp page on which table is displayed. The table> consists of 2 columns,> first col consists radio button second col consists dept code.> What I want is onclick of any radio button the value of dept code> should be displayed in textbox> on second jsp.> > The first jsp name is department.jsp.> The second jsp is indent.jsp.> > In department.jsp I have <table> of html which displays dept code.The> table is in form tag> <form name="frm" action="indent.jsp">> I have submit button which calls indent.jsp> Is my approach  correct?Possibly.Does it work?-- Lew
0
Reply Lew 4/14/2007 2:41:51 PM

On Apr 14, 7:41 pm, Lew <l...@nospam.lewscanon.com> wrote:> savita wrote:>> >             I  will redefined my problem . I am working on jsp.> >       I have one jsp page on which table is displayed. The table> > consists of 2 columns,> > first col consists radio button second col consists dept code.> > What I want is onclick of any radio button the value of dept code> > should be displayed in textbox> > on second jsp.>> > The first jsp name is department.jsp.> > The second jsp is indent.jsp.>> > In department.jsp I have <table> of html which displays dept code.The> > table is in form tag> > <form name="frm" action="indent.jsp">> > I have submit button which calls indent.jsp> > Is my approach  correct?>> Possibly.>> Does it work?>> --> Lew- Hide quoted text ->> - Show quoted text -onclick of radio button on department page , the word   on    getsdisplayed in texbox on indent.jsp instead of the dept code. Help isurgently  neededThanks
0
Reply savy 4/16/2007 1:31:16 PM

5 Replies
267 Views

(page loaded in 0.118 seconds)


Reply: