Update element value ViewWeb2 .net Control

Joined
Oct 7, 2022
Messages
2
Reaction score
0
I'm new to javascript but working on a vb.net application with ViewWeb2 control and need to set the value of an element on the EasyShip website.

Basically, I have a USB scale attached to the computer with a vb.net app that reads the weight from the scale and I want to programmatically update the weight on the page instead of having to key it in manually.

I found some code to read the value of an element on the google site and it worked great, here's the commands:

WebView21.Source = New Uri("http://google.com")
Dim strGoogleSearchValue As String = Await WebView21.ExecuteScriptAsync("document.getElementById('gbqfbb').value")

However, I can't figure out how to get or set the value of the elements on EasyShip.com. I don't see the element id, this is what I see when I inspect the page:

<input aria-invalid="false" name="order.parcels.0.totalWeight" type="number" class="MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputAdornedEnd MuiOutlinedInput-inputAdornedEnd" value="0.258">

Any help would be greatly appreciated.

Thanks
 
Joined
Oct 7, 2022
Messages
2
Reaction score
0
Hi, I got a bit further, I'm now able to set the value in the text box using this: document.querySelector("input[name='order.parcels.0.totalWeight']").value='7.77'

However, if I click any where on the form or on the filed itself, the value reverts back to the old value. Also, if I set the value and hit the save button, it doesn't save the new value in the field it changes it back. Can someone help me resolve this?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top