Jump to content

Click on IE object / Sortable Table


Recommended Posts

Hi,

I use a lot of scripts to automate my work. Now recently the website I use to do my work got a little update which made my scripts not work properly anymore.

I used to click on a table row using _IELinkClickByText(), which leads me to the next page of the website.
Unfortunately they altered the way they made the table. According to the source they made the table sortable using some sort of javascript.

What I try to do is to click on the (TR) row having (TD) example 3.

So far I tried the following options...
- _IELinkClickByText ("example 3") : Failed, because there are no more links in this table
- _IEAction($object, "click") (I can find the ID using _IEGetObjById, but can't apply the click to it, simply nothing happens)
- _IEPropertyGet($object, "xxxxx") I can get every property of the object, but can't apply any form of action to it (I use this just to make sure the object exist and can be interact with.)
- _IENavigate() Going directly to the other page results in an "Validation Error"

How?

Here is the source of the page they altered

Spoiler

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <meta http-equiv="X-UA-Compatible" content="IE=10,IE=8" />
    <link href="/Content/css?v=0kp9m7rlRNZAxcpz537Q1oy9CIQGFSyeqP--oAs4JcA1" rel="stylesheet"/>

   
</head>
<body>
            <div class="results">
                <input id="linkid" name="LinkId" type="hidden" value="" />
                <table id="gridmeldingen" class="pagedgrid tablesorter" style="border-width: 0; border-collapse: collapse;">
                    <thead>
                        <tr>
                            <th style="width: 10%" class="textleft data-header-nr">column 1</th>
                            <th style="width: 60%" class="textleft data-header-melding">column 2</th>
                            <th style="width: 30%" class="textleft data-header-categorie">column 3</th>
                        </tr>
                    </thead>
                    <tbody>
                            <tr class="meldinglink" id=101>
                                <td class="data-nummer">01</td>
                                <td class="data-melding">example 1</td>
                            </tr>
                            <tr class="meldinglink" id=102>
                                <td class="data-nummer">02</td>
                                <td class="data-melding">example 2</td>
                            </tr>
                            <tr class="meldinglink" id=103>
                                <td class="data-nummer">03</td>
                                <td class="data-melding">example 3</td>
                            </tr>
                            <tr class="meldinglink" id=104>
                                <td class="data-nummer">04</td>
                                <td class="data-melding">example 4</td>
                            </tr>
                            <tr class="meldinglink" id=105>
                                <td class="data-nummer">05</td>
                                <td class="data-melding">example 5</td>
                            </tr>
                    </tbody>
                </table>
            </div>
</form>
    <script src="/bundles/javascript?v=bE_gJnXHm2tYHj90LyzFOi2rNAsEe5fvtRIrKUzpEi81"></script>

   
    <script>

        function submitForm(event) {
            var form = $(event.target).parents('form');
            form.submit();
        }

        function submitBrontype(event) {
            $('#linkid').val('');
            submitForm(event);
        }

        function submitMelding(event) {
            var linkid = $(event.target).parents('tr').attr('id');
            $('#linkid').val(linkid);
            submitForm(event);
        }

        $(document).ready(function () {
            $('.meldinglink').click(submitMelding);
            $('.radiobuttonlist').change(submitBrontype);
            $("#gridmeldingen").tablesorter({ sortList: [[0, 0]] });
        });

    </script>

</body>
</html>

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...