0

I have inherited a large codebase, mostly in C++; this C++ is creating an HTML page that is being displayed in an Internet Explorer web browser.

The HTML does not included any Javascript (.js) files. There is, in addition, an <object> within the HTML; this object seems to be an entirely application-specific, custom object. Here is the skeleton code for the HTML:

<html>
    <head>
        (Nothing relevant here - no .js files are included)
    </head>
    <body>
        <object
            id=objAppIT
            GUID_START=1 classid="CLSID:D19BF5B4-74E8-437D-8EB0-FCF709C36C77" GUID_END=1
            VER_START=1 codebase="AppIT-Deployer-2,3,1,2.cab#version=2,3,1,2" VER_END=1
        >
            <param name="CFG"
                   value="ACTION=LAUNCH 
                          SID=77cded6b-ddaf-441f-ae4a-d2764d519ab6
                          AID='0000000010000000-00000000000010AC-0005-11-17~05|34|32.149'
                          UID=N/A"
            />
        </object>
        <form id=formSubmit method=post action="valid_url_here">
            (various <input> fields here)
        </form>
        <script type="text/javascript">
            window.onload = function()
            {
                var objAppIT = document.getElementById("objAppIT");
                objAppIT.Evoke("LAUNCH", "formSubmit");
            }
        </script>
    </body>
</html>

The code above successfully submits the form - apparently, just as though the form was submitted in the usual fashion (not using the <object id=objAppIT>.

I have googled to see if Evoke() is a Javascript function that can be called on any <object> - because no .js file is included that could otherwise define that function. I can't find any documentation for Evoke().

Therefore, I do not understand how the above form is submitted.

Hence, my question: Is there a Javascript function Evoke()? If so, what does it do? If not, I would further appreciate if someone could explain how the above HTML/Javascript snippet is submitting this form.


Besides your two answers, here's another four:

  1. _DEBUG vs NDEBUG
  2. The linker uses different libraries during debug and release
  3. The debug build also produces the symbols used for debugging
  4. Code can end up optimized away, so, in certain situations, you may get fewer calls to some constructors during release, which can cause some nasty bugs. here's an example:
Object x(3);
Object y;
y = x;

versus:

Object x(3);
Object y = x;
4

1 に答える 1

0

evoke関数についても聞いたことがありませんが、のように聞こえdispatchEventます。

Evoke関数はユーザー定義関数のようです。それが何をし、渡された各パラメーターで何が行われるかを正確に伝えることはできませんが、2 番目のパラメーター (<form>要素の ID) を取り、次のようなものを使用してそれを送信すると仮定します。

document.getElementById('formSubmit').submit();
于 2012-05-21T15:44:23.130 に答える