Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
3
Erster Beitrag:
vor 7 Jahren, 11 Monaten
Letzter Beitrag:
vor 7 Jahren, 11 Monaten
Beteiligte Autoren:
Damon Hacker.pcs.crosspost, Damon Hacker, DanM

How do you pass data entered into a edit control in the browser to the server in WB14 AWP page?

Startbeitrag von DanM am 17.10.2009 22:31


I am able to see the data in the browser code but do not know how to pass the data from the browser to the server code?

I put a Info(EDT_Qty) in the browser code and it displays the data entered in the browser edit control but when I try to pass the edit control EDT_Qty as a parameter the data shows as 0 not the 111 which was entered in the edit control ???

How do you pass data entered into a edit control in the browser to the server in WB14 AWP page?

Antworten:

I'm very interested in a solution to this as well...I've got the same basic question, but instead of using AWP, I'm using PHP with MySQL server...but for technical reasons I'm not using the native MySQL connection and therefore the typical Hfunctions and ScreenToFile, etc., aren't available.

I have the MySQL read/write PHP statements all working, just can't populate from the browser controls.

Thanks.

von Damon Hacker - am 24.10.2009 05:24

Re: How do you pass data entered into a edit control in the browser

Fabrice,

I can't answer for Dan's situation, but here's mine...I'm sure I'm just missing something or not understanding exactly how the controls work.

Very simplistic example. I have an Edit control and a Button control on a PHP page. I'm trying to capture the contents of the Edit control (EDT_Text1) upon pressing of the button (BTN_Save).

I am back-ending this webapp with MySQL (v5.1) and for technical reasons can't use the MySQL Native driver (although I'm presently considering switching hosting facilities as this would allow me to use the typical Hfunctions). Anyhow, I've written PHP code in the server code of the button that handles the insert into the MySQL database. This is working fine if I create an Insert SQL statement and manually enter the data (i.e Insert into contacts VALUES ('test text');)...I can even get this to work if I insert the contents of a variable (i.e. INSERT into contacts VALUES ('$texttoinsert'); However, I can't seem to figure out how to get the variable $texttoinsert to reflect the data that is in the EDT_Text1 control. (For test purposes I had set $texttoinsert = 'test text'; and it will work...just can't get it to pull the value of EDT_Text1 and assign it to $texttoinsert.)

I know that the edit control is working, as if I put an Info(EDT_Text1) code in the browser code of BTN_Save, and hit the Save button, I get the information that is typed into EDT_Text1 on the messagebox. I just seem to be missing or misunderstanding the whole round-trip to the server aspect and how I can get the PHP code in the server to get the value of the EDT_Text1. (BTW, $texttoinsert = $_POST(EDT_Text1) doesn't seem to be working, yet that's how I would do it if I was writing it in PHP outside of WebDev) It seems to be something with the posting going from the browser to the server.

Any assistance would be much appreciated.

-D
Fabrice Harari wrote in news message :
>
>
> Hi Dan...
>
> with webdev, you need to be much more precise in your question...
>
> - WHAT is exactly your non working code?
> - WHERE is it located? (browser/server/Button/link/Options of the button
> (send controls value to server or not...etc)
>
> There are several answers to your question, depending on all that... In
> some case, you can use ajaxExecute, in others, you use a button to start
> a process and have to check the send value to server, etc, etc
>
> Best regards
>
>
> --
> Fabrice Harari
> International WinDev, WebDev and WinDev mobile Consulting
>
> More information on http://www.fabriceharari.com
>
> DanM wrote:
> > I am able to see the data in the browser code but do not know how to pass the data from the browser to the server code?
> > I put a Info(EDT_Qty) in the browser code and it displays the data entered in the browser edit control but when I try to pass the edit control EDT_Qty as a parameter the data shows as 0 not the 111 which was entered in the edit control ???
> > How do you pass data entered into a edit control in the browser to the server in WB14 AWP page?
> >

Message forwarded from pcsoft.us.windev

von Damon Hacker.pcs.crosspost - am 26.10.2009 06:17
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.