Browser widget: set value of password input [Solved]

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Cairoo
Posts: 110
Joined: Wed Dec 05, 2012 5:54 pm

Browser widget: set value of password input [Solved]

Post by Cairoo » Tue Jun 25, 2024 9:15 am

Hi all

I have a password type input on a form in a browser widget.

I get an error when I try to set the input's value like so:

Code: Select all

do "document.getElementById('login_passwd').value = 'myPassword'" in widget "Browser1"
The error says,
LCB Error Value is not of correct type for assignment to variable - expected type <type: livecode.lang.string> for assigning to variable tResult in com.livecode.widget.browser.browserEvaluateJavaScript
Object Browser1
LCB File browser.lcb
LCB Line 864
What am I doing wrong?
Last edited by Cairoo on Tue Jun 25, 2024 11:50 am, edited 1 time in total.

Cairoo
Posts: 110
Joined: Wed Dec 05, 2012 5:54 pm

Re: Browser widget: set value of password input [Solved]

Post by Cairoo » Tue Jun 25, 2024 10:53 am

I've just now discovered that the password input actually has no id attribute, so that's why there's an error.

I will now close this topic because I don't want to waste anyone else's time.

Post Reply

Return to “Internet”