CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 + & - buttons in grid

Print topic Send  topic

Author Message
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?
View profile  Send private message
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 8-)
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.