How to pass edit control value as a parameter?

Startbeitrag von Dan M am 17.10.2009 19:06

I am working with the WB14 example AWP Showroom.

On the detail page there is a buy button which when you click it it adds "1" to the basket.

If the item is not in the basket it creates it and adds "1". If the item exists it adds "1" to the existing quantity value..

I want to change it so the user can enter the quantity they want to purchase.

So, I added a edit control to the detail page where the user can enter a quantity. When the user clicks the BUY button I changed the parameter that is past from "1" to the name of the edit control (EDT_Qty).

When I run it through the debugger the EDT_Qty value is zero???? Even though when the program is running I entere a value (example 100).

How do I get the value entered in the edit control to be recognized so when I pass the edit control as a parameter it recognizes the value entered by the user?

Any help is appreciated ... Dan


Antworten:

Since this page is an AWP page I think this is affecting the value of the edit control.

In the code of the edit control (EDT_Qty) there is an event called "Exit with modifcation (onchange). This is a browser function.

I thought I could put nBasketQty = EDT_Qty and then pass the nBasketQty as a parameter but I get the following ...

Modifications of global variable (nBasketQty) will not be processed on the server

How do I get the value entered in the edit control (EDT_Qty) passed as a parameter or assigned to a variable which can then be passed as a parameter ?

so far I have not been able to pass it as EDT_Qty or as nBasketQty (after assigning EDT_Qty to nBasketQty)

I do not understand how to get the value entered in a edit control ??

Can anyone tell me where I can learn what is going on or how to get to the value entered in the edit control?



von DanM - am 17.10.2009 21:27
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.