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

 Add Button to Each Row with onclick event

Print topic Send  topic

Author Message
Brandy
Posted: 05/20/2005, 1:19 PM

I am using CCS 2 with ASP 3.0
I am pulling data from a database, I added one more column and put a button. In the onclick event i put this:

Dim DAO, db, RecFile, RecImport

audit.hidden1.value = audit.lblid.value
audit.textbox1.value = audit.hidden1.value
audit.textbox1.value = CCDLookup("ProdName","Audit","id=" & CCToSQL(audit.textbox1.value,"Integer"), DBIntranet)

Set DAO= CreateObject("DAO.DBEngine.36") Set db=DAO.Workspaces(0).OpenDatabase("\\server\wwwroot\intranet\intranet.mdb", Empty, false, "")

Set RecImport = db.openrecordset("SELECT id, prodName FROM Audit WHERE id = " & audit.lblid.value &_
" and prodName = '" & audit.lblProdName.value & "'")

Set RecFile = db.openrecordset("SELECT prodName FROM IgnoreList")

RecFile.AddNew
RecFile("prodName") = RecImport("ProdName")
RecFile.Update
Set RecFile = Nothing

Why is it that the field loses it's value, when i click the button.
i get an error say that the field can't contain a null value.

How can i make sure before i click the button that both the hidden1 and textbox1 values are retained.

Thanks
BRandy

Nicole

Posts: 586
Posted: 05/23/2005, 2:15 AM

Brandy,
Value property of control in unavailable in button onClick event. Use CCGetParam() function to retrieve values, e.g.
  
response.write CCGetParam(“HiddenName”, “default value”)  
Also you cannot assign values to form_name.field_name.Value in onClick event.

_________________
Regards,
Nicole
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.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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