Finding Parent form's button from frame in javascript
<p>i cant get my main form's button from frame by javascript.I am getting button's ID by querystring then i execute following script but cant get button.When i write parameter's name such as getElementByID('btnDelete'),it founds control?What can be reason and how can i solve this problem?</p>

<pre><code>       function okay() {  
        var btn = getQuerystring('btn');
        window.parent.document.getElementByID(btn).click();
</code></pre>

<p>}</p>

<pre><code>function getQuerystring(key, default_) {
            if (default_ == null) {
                default_ = "";
            }
            var search = unescape(location.search);
            if (search == "") {
                return default_;
            }
            search = search.substr(1);
            var params = search.split("&amp;");
            for (var i = 0; i &lt; params.length; i++) {
                var pairs = params[i].split("=");
                if (pairs[0] == key) {
                    return pairs[1];
                }
            }
            return default_;        }
</code></pre>
