Current time: 11-19-2019, 06:02 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
selectValue equivalent on browsers other than IE
06-04-2014, 05:39 AM
Post: #1
selectValue equivalent on browsers other than IE
I want to script selecting a value in the dropdown list. As per the doc

selectValue id=email label=foo@bar.com

would work. However how do I do the same for Chrome/FF?
Find all posts by this user
Quote this message in a reply
06-05-2014, 12:26 AM
Post: #2
RE: selectValue equivalent on browsers other than IE
Use exec combined with plain old JS is probably your best bet. That way you can debug it locally in dev tools to make sure it works.

Something like:

exec document.getElementById("email").selectedIndex = 5
Visit this user's website Find all posts by this user
Quote this message in a reply
06-05-2014, 03:27 AM
Post: #3
RE: selectValue equivalent on browsers other than IE
(06-05-2014 12:26 AM)pmeenan Wrote:  Use exec combined with plain old JS is probably your best bet. That way you can debug it locally in dev tools to make sure it works.

Something like:

exec document.getElementById("email").selectedIndex = 5

Thank you for that pointer. That works! Appreciate your prompt response as always
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)