Skip to content

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

@sohaibameen

Description

@sohaibameen

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions