AngleSharp / AngleSharp.Js

:angel: Extends AngleSharp with a .NET-based JavaScript engine.

Home Page:https://anglesharp.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to execute Javascript with anchor tag to submit a form?

sohaibameen opened this issue · comments

Hi,

I have a page where multiple links are present with a form attached to every link.

details
                <form class="block" id="details0" name="details0" action="/Details" method="post">
                    <input type="hidden" id="stampal" name="stampal" value="S029W151921782129800000">
                    <input type="hidden" id="sentBy" name="sentBy" value="S029W">
                    <input type="hidden" id="page" name="page" value="Detail">
                </form>

On clicking anchor tag it executes Javascript code "javascript:document.details0.submit();" and submits the form to take the user to detail page.

I have two requirements for this

1- how can I execute Javascript in given link to submit form?
2- How can I get the current detail form's context to scrap the information?

Best Regards,
Sohaib

Landed in devel.