CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> Archive -> GotoCode Archive

 Define a variable?! Help!!

Print topic Send  topic

Author Message
Simon
Posted: 02/13/2003, 2:34 AM

Sorry if you have read my other post about the same thing, but I thought if I put the exact title people may read it!

Anyway if you haven't read the other one, I get the error;

Microsoft VBScript runtime error '800a01f4'

Variable is undefined: 'flditem_name'

/test/ecommerce/item_view_events.asp, line 22

How and where would I define the variables? ASP in CCS by the way.

PS. If you are wondering what this is, it's exactly the same as the paypal article, I'm trying to get the dynamic paypal 'add to cart' buttons to work, without luck!

Simon
Simon
Posted: 02/13/2003, 4:15 AM

Hi, just got some more info for this question, I used the dim command for the variables, but nothing shows up, heres what I have done;

On my item view table I have added a lable at the bottom (within the <-row-> tags), set it's content to html, and named it paypal. Then, I added custom code to the before show event, as follows;

Function Items_categorie_Paypal_BeforeShow() 'Items_categorie_Paypal_BeforeShow @126-6A2D3361

'Custom Code @127-73254650
' -------------------------

dim fldpaypal, flditem_ID, flditem_name, flditem_price

fldpaypal = "<a href=""#""onClick=""window.open('https://www.paypal.com/cart/add=1&business=recedo@eurobell.co.uk&item_name=" & flditem_name& "&item_number=" & flditem_id & "&amount=" & flditem_price & "&image_url=&return=http://www.yourdomain.com/thankyou.asp&cancel_return=http://www.yourdomain.com/cancel.asp','cartwin','width=600,height=400,scrollbars,resizable,status');""><img src=""http://images.paypal.com/images/x-click-but23.gif""border=""0""></a>"

' -------------------------
'End Custom Code

Then ran the page, the button doesn't show up at all. I added "-paypal" next to the label in design view (plain text) just to see if that shows up, and it does, but no link/button.

By the way, the grid shows item_name, item_ID, and item_price. How do I go about doing this, or another way of making the dynamic link using ASP in code charge studio.

I'm quite new to ASP as well as CCS so please excuse me for being stupid!

Thanks
Simon

Simon
Posted: 02/13/2003, 6:16 AM

Don't worry, I fixed the problem myself. I found a previous post about populating the address etc parts, and I realised that the article I was using was actually for CC and not CCS, so now instead of things like flditem_name I use grid_name.Label_name.value or something like that!

I am very happy now!

Simon

   


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.