pr3mium
Posts: 31
|
| Posted: 03/29/2004, 9:15 PM |
|
I'm trying to do a warehouse-like thingy, where I have a grid that displays current items and their counts and in the last column there are 2 buttons on each row (+ & -). Clicking "+" adds 1 to current count, makes the change in the DB and refreshes the page, "-" does vice versa.
I found out that if I add buttons in grid, they don't work - even with a simple prompt onclick action. I tested a little bit and discovered that if I set the grid to show only 1 item per page, it works, so I guess the buttons somehow conflict with other rows.
Any idea how to get pass this?
|
 |
 |
DonB
|
| Posted: 03/30/2004, 3:16 AM |
|
A grid has no <FORM>, therefore a button won't have anything to submit (send
back to the server). One option would be to use Links that pass a parameter
back (like ?add=1 or ?sub=1) to the server. With a bunch of client-side
javascript you could probably integrate a <FORM> into the page and put
onclick actions on the buttons so they interact with that form, overriding
the default behavior (they normally expect to be contained within a <FORM>)
--
DonB
http://www.gotodon.com/ccbth
"pr3mium" <pr3mium@forum.codecharge> wrote in message
news:640690281d010a@news.codecharge.com...
> I'm trying to do a warehouse-like thingy, where I have a grid that
displays current items and their counts and in the last column there are 2
buttons on each row (+ & -). Clicking "+" adds 1 to current count, makes the
change in the DB and refreshes the page, "-" does vice versa.
> I found out that if I add buttons in grid, they don't work - even with a
simple prompt onclick action. I tested a little bit and discovered that if I
set the grid to show only 1 item per page, it works, so I guess the buttons
somehow conflict with other rows.
>
> Any idea how to get pass this?
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
pr3mium
Posts: 31
|
| Posted: 08/25/2004, 10:00 PM |
|
Well, thanks.
Actually I found a solution soon after I submitted this post.
I have two buttons, which pass parameters to server side ASP script, which does its job and then returns to referer - working well
|
 |
 |
|