Browser Widget and htmltext

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
lohill
Posts: 770
Joined: Tue Dec 08, 2009 6:37 pm
Location: San Diego, CA USA

Browser Widget and htmltext

Post by lohill » Mon Dec 28, 2020 3:06 am

I have a URL which when launched in a browser widget produces a form for conducting a backtest of a specific stock screen. To do the backtest you just click the button called "Run Backtest". If you have a password for screening, you may type it into the passwords field on the form and then click the button "Run Screener" to get a list of stocks that currently fit the criteria. When I examine the HTML for the form, some of the form elements have specific IDs while others do not have IDs. For example I can set the radio button for a detailed report with the following: do "document.getElementById('reporttype_detailed').checked = 'true'" in widget "Browser" Unfortunately I have no IDs for the password field or either of the two "Run" buttons.

I have been able to edit the HTML and supply a value for the password. I then use the following command to re-load the browser: set the htmltext of widget "Browser" to <the edited text>. The final result shows the password in the password field as desired but the browser widget has been substantially changed. Its color is different and the "Run" buttons no longer work - they can be clicked and they hilite but they do nothing else. I can get the htmlText of the final product and it matches the original htmltext. Why do those buttons loose their ability to work and is there any way I can automate running the Screener by programmatically supplying a password and 'clicking' the Screener button.?

I have attached a sample stack that demonstrates the before and after widget and the before and after HTML.

Larry
Attachments
Broswer Testing.livecode.zip
(3.21 KiB) Downloaded 135 times

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”