Logo
My Account |  Site Map | Contact Us  
Welcome Guest Search | Active Topics | Sign In | Register

Input value and getting header items on return in C# Options
Scott
Posted: Wednesday, June 24, 2020 5:17:46 PM
Rank: Newbie
Groups: Member

Joined: 6/24/2020
Posts: 7
Been working with EO for a couple of days. I need to be able to read/write to <input type="hidden" id="_launchType" value=""> from a desktop application in C#. Also I need to read header values from a cloud return. I have reviewed documentation and can't seem to find this. Appreciate your help.
eo_support
Posted: Wednesday, June 24, 2020 5:43:22 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 22,273
Hi,

To write into input elements, you can simply use JavaScript code. The code can be something like this:

Code: C#
webView.EvalScript("document.getElementsByTagName('input')[0].value='test';");


Here:

Code: JavaScript
document.getElementsByTagName('input')[0].value='test';


Is the JavaScript code to set the first input element's value to 'test'. You can modify it to fit your need.

In order to read header values from a cloud return, you will need to handle this event:

https://www.essentialobjects.com/doc/eo.webbrowser.webview.afterreceiveheaders.aspx

Inside the event handler, you can examine the e.Response.Headers for header entries coming back from the server.

Please let us know if you still have any more questions.

Thanks!
Scott
Posted: Monday, June 29, 2020 2:45:11 PM
Rank: Newbie
Groups: Member

Joined: 6/24/2020
Posts: 7
Thanks. I able to read values from the website. Now I need to write values to the website but the local value is a variable. I am using the elements Id as follows.

webView1.EvalScript("document.getElementById('connected').value = ' variable goes here'");

Let me know. Thanks.

Never mind. I think I figured it out. Thanks anyway.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.