How retrieve textarea value in a WebGadget (in Windows)?

Just starting out? Need help? Post your questions and find answers here.
crabou
New User
New User
Posts: 6
Joined: Mon Jan 29, 2018 4:54 am

How retrieve textarea value in a WebGadget (in Windows)?

Post by crabou »

Using the WebGadget, I have a page that has an HTML textarea field for which I need to retrieve the value within PB. This value may easily be a couple thousand characters long.

I was hoping to get the value via GetGadgetItemText (using #PB_Web_HtmlCode). It appears that the value returned is the ORIGINAL html, not the revised html. Note that through javascript I have moved the value from the textarea to a hidden mirror field's innerhtml...which I can verify is being done by temporarily un-hiding the field. However, the html that is returned shows the original html, not the updated.

Are there any suggestions on what I may be missing or alternate ways of accomplishing this? Thanks!
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: How retrieve textarea value in a WebGadget (in Windows)?

Post by JHPJHP »

Hi crabou,

A couple questions you might want to consider.
1. Does the text area have an id? (makes things easier if it does)
2. How many text areas are there? (this doesn't matter so much)

Windows Services & Other Stuff\Other_Stuff\GadgetStuff\WebGadget\
- Element_With_ID.pb
- Elements_Without_ID.pb
Last edited by JHPJHP on Thu Dec 03, 2020 1:35 am, edited 3 times in total.
crabou
New User
New User
Posts: 6
Joined: Mon Jan 29, 2018 4:54 am

Re: How retrieve textarea value in a WebGadget (in Windows)?

Post by crabou »

Thanks JHPJHP :D

The webpage has only 1 textarea and there is indeed an ID.

I really appreciate your code and will dig into it. While I have a heavy programming background, I have little PB experience but look forward to digging deeply. Thanks again!
Post Reply