Welcome Guest Search | Active Topics | Sign In | Register

Help- button click without id,name Options
alihuseyin
Posted: Saturday, April 18, 2015 6:59:10 AM
Rank: Member
Groups: Member

Joined: 3/19/2015
Posts: 10
<button value="1" class="_42ft _4jy0 _11b _4jy3 _4jy1 selected _51sy" data-ft="{&quot;tn&quot;:&quot;+{&quot;}" type="submit">Paylaş</button>


I wanna press share button and here is my code:
webControl1.WebView.EvalScript("document.getElementByClassName('_42ft _4jy0 _11b _4jy3 _4jy1 selected _51sy').submit();");

but it does not work.
How can I press this button?

Thanks
eo_support
Posted: Saturday, April 18, 2015 10:45:18 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

If you just want to post the form, you can call submit method on the form element instead of on the submit button.

Thanks!
Fabien
Posted: Tuesday, April 21, 2015 3:11:24 AM
Rank: Advanced Member
Groups: Member

Joined: 7/21/2014
Posts: 129
Hi,

Your JS code must be :
document.getElementsByClassName('_42ft _4jy0 _11b _4jy3 _4jy1 selected _51sy')[0].click();

the document.getElementByClassName() function doesn't exist in JS.

or as eo_support says just use the submit() method on the form element.

You can call the form element directly by his name like : my_form_name.submit();


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.