views:

703

answers:

2

So there is a button call next (page). Its href link is site/blah/#. So i know its really running javascript code. After i finish parsing the first page i would like to parse the next page. How do i simulate a mouse click there so i can continue loading and parsing pages?

i am using C# .NET

A: 

childElement.RaiseEvent("OnClick");

acidzombie24
A: 
 <head>
    <script language="javascript" type="text/javascript">
    function MyClickEventHandler()
    {

    var link = document.getElementById('<%= LinkButton1.ClientID %>');
    link.click();
    }


    </script>
</head>
<body  onload="MyClickEventHandler();">
    <form id="form1" runat="server">
    <div>

        <asp:LinkButton ID="LinkButton1" runat="server" onclick="LinkButton1_Click">LinkButton</asp:LinkButton>

    </div>
    </form>
</body>
</html>
David Stratton