Change value in "virtual popup" on webpage

TechChad

New Member
Joined
Dec 21, 2012
Messages
3
Hello!
Normally when I want to change a element i just enter: "IE.document.all("ELEMENT").Value = "NEW VALUE".
But now I have a webpage that open a new webpage like a embedded popup (see picture https://www.dropbox.com/s/kqjmx2nw7t325xv/popup.png?dl=0).
If I now try to change a element (with "IE.document.all("ELEMENT").Value = "NEW VALUE") that's is in the popup, I get an error "Object needed".
The reason I can see is because the "popup" is a diffrent webpage that embedded in the mainpage.

Anyone that have a solution?

(sorry for bad english and my lack of VBA knowledge)



Here some html for the virtual popup (not the main page that shadowed), the textarea I want to put some text in is "ctl00_MainContent_tb_import" (red text in the code):

Code:
****** data-rootpath="https://market.symbrio.com/">
    <form method="post" action="./ImportWindow.aspx?ss=kA" id="aspnetForm">
<div class="aspNetHidden">
<input name="__EVENTTARGET" id="__EVENTTARGET" value="" type="hidden">
<input name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" type="hidden">
<input name="__VIEWSTATE" id="__VIEWSTATE" value="//" type="hidden">
</div>

******** type="text/javascript">
//<![CDATA[
var theForm = document.forms['aspnetForm'];
if (!theForm) {
    theForm = document.aspnetForm;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
*********>


********>var rootPath = 'https://market.symbrio.com/';*********>
******** type="text/javascript">
//<![CDATA[

                // Injected from SymMasterPage.Page_PreRender()
                var _okToSubmit = true; 
                function CheckOkToSubmit(e)
                {
                    var e = e || window.event; // window.event is IE-only. Other browsers pass event object as first param to the event function
                    if(!document.forms[0])
                        { return; }
                    if (_okToSubmit)
                    {
                        if (e && e.srcElement && e.srcElement.tagName && (e.srcElement.tagName == 'BUTTON' || e.srcElement.tagName == 'A'))
                            { _okToSubmit = !_okToSubmit; }
                        return true;
                    }
                    return _okToSubmit;
                }
                document.forms[0].onsubmit = CheckOkToSubmit;//]]>
*********>

<div class="aspNetHidden">

    <input name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="ACEF8D5D" type="hidden">
</div>
        <div id="wrapper" class="inIframe">
            
            <div id="ctl00_main">
                <div class="content container">
                    <table class="fixed-content">
                        <tbody><tr>
                            <td>
                                <div class="article">
                                    
    ******** src="/Assets/modules/importwindowpopups.js?v=164174">*********>
    <div class="VirtualPopupBody iframeBody">
        <div class="grid-5">
            <div class="span-5 last">
                <span id="ctl00_MainContent_l_information" class="ValueLabel">Format: Artikelnr [mellanslag] Antal. Exempel: "123456  20"</span>
            </div>
            <div class="span-5 last">
                [COLOR="#FF0000"]<textarea name="ctl00$MainContent$tb_import" rows="2" cols="20" id="ctl00_MainContent_tb_import" class="TextArea" style="height:304px;width:344px;"></textarea>[/COLOR]
            </div>
            <div class="span-5 last">
                <div align="right">
                    <button type="button" id="ctl00_MainContent_b_paste" tabindex="0" *******=";ImportFromClipBoard()" class="btn" style="display: none;"><span><span>Klistra in artiklar</span></span></button>
                    <button type="button" id="ctl00_MainContent_b_close" tabindex="0" *******=";CloseImportPopup()" class="btn"><span><span>Stäng</span></span></button>
                    <button value="submit" type="submit" id="ctl00_MainContent_b_import" tabindex="0" *******=";WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions('ctl00$MainContent$b_import', '', true, '', '', false, true))" class="btn important"><span><span>Importera</span></span></button>
                </div>
            </div>
        </div>
    </div>

    ********>
        //SYM.modules.add('importwindowpopups');
    *********>

                                </div>
                            </td>
                            <td>
                                <div class="sidebar">
                                    
                                </div>
                            </td>
                        </tr>
                    </tbody></table>
                </div>
            </div>
        </div>
    
******** src="/WebResource.axd?d=pynGkmcFUV13He1Qd6_TZFlF4S-DQx4yubNg-tTjBmr6veUiMtRy3I5iqyyCtNt_U10DUPs4HvoWuXiJA-WWiw2&t=636101136168974311" type="text/javascript">*********>
</form>
    ******** src="https://market.symbrio.com/Assets/js/main.js?v=164174">*********>
    


</body>
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Forum statistics

Threads
1,214,515
Messages
6,119,973
Members
448,933
Latest member
Bluedbw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top