Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8108331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:04:37+00:00 2026-06-06T01:04:37+00:00

file1.html <html> <head> <title>AIDS (Automated ID System)</title> <HTA:APPLICATION id=frames border=thin caption=yes icon=http://www.google.com/favicon.ico showintaskbar=yes singleinstance=yes

  • 0

file1.html

<html>
<head>
<title>AIDS (Automated ID System)</title>
<HTA:APPLICATION 
    id="frames" 
    border="thin" 
    caption="yes" 
    icon="http://www.google.com/favicon.ico" 
    showintaskbar="yes" 
    singleinstance="yes" 
    sysmenu="yes" 
    navigable="yes" 
    contextmenu="no" 
    innerborder="no" 
    scroll="auto" 
    scrollflat="yes" 
    selection="yes" 
    windowstate="normal" />

<script language="javascript" type="text/javascript">

    function pausecomp(millis) 
    { 
        var date = new Date(); 
        var curDate = null; 
        do { curDate = new Date(); } 
        while(curDate-date < millis); 
    } 

    function getWindowsUserName()
    {
        var WinNetwork = new ActiveXObject("WScript.Network");
        var urlToSite = createCustomURL(WinNetwork.UserName);
        var frame = document.getElementById("psyncLink"); 
        frame.onload = function() { 
            frame.onload = null; 
            if (requestingPassword()) { 
                //alert("password button screen");
                passwordButtonScreen();
            } else { 
                alert("direct password required"); 
            } 
        } 
        frame.src = urlToSite;
    }

    function requestingPassword()
    {       
        var btn = window.frames[1].document.getElementsByName("SUBMIT-password.pss");
        if (btn.length == 0) {
            return false;
        } else {
            return true;
        }
    }

    function passwordButtonScreen()
    {       
        var btn = window.frames[1].document.getElementsByName("SUBMIT-password.pss");       
        btn[0].click();     
    }

    function createCustomURL(userName)
    {
        var customURL = "http://localhost/nph-psf.exe?HOSTID=AD&ALIAS=" + userName;
        return customURL;
    }

    function Sleep(milliseconds) {
        var start = new Date().getTime();
        for (var i = 0; i < 1e7; i++) {
            if ((new Date().getTime() - start) > milliseconds){
                break;
            }
        }
    }

    function whichScreen() { 
        var btn = window.frames[1].document.getElementsByName("SUBMIT-password.pss"); 
        if (btn.length == 0) { 
            alert("no button!"); 
            // User is at password screen
            var textField = window.frames[1].document.getElementsByName("_MYPW");
            textField[0].text = "";
            return; 
        } else { 
            btn[0].click();
            WaitSeconds(5);
            var textField = window.frames[1].document.getElementsByName("_MYPW");
            textField[0].value = "ios12sdk";
            btn = window.frames[1].document.getElementsByName("SUBMIT-VERIFY");
            btn[0].click();
        }
    }

    var loadOtherFrame = function (text) { 
        getWindowsUserName(); 
        alert(text);
    };

</script>

    </head>     
    <frameset cols="300px, *"> 
        <frame src="leftframe.html" name="topo" id="topo" application="yes" /> 
        <frame src="topo1.htm" name="psyncLink" id="psyncLink" application="yes" /> 
    </frameset>     
</html> 

leftframe.html

<html>

<head>
  <title>AIDS&nbsp;Assistant</title>
</head>
<script language="javascript">

function checkPassword() {
  var validString = /^[a-z](?=[a-z]*[0-9])[a-z0-9]{0,6}[a-z]$/;
  if (validString.test(document.getElementById("newPassword").value)) {
    alert("The password is valid");
    var validate = function () {
        // validate textbox input ...
        // call parent page function
        parent.loadOtherFrame(document.getElementById("newPassword").value);
    };
  } else {
    alert("The new password does NOT meet the requirements. Please try again.");
  }
}



</script>

<body>
    <table width="300px">
        <tr>
            <td>Type Your Old Password</td>
            <td><input id="oldPassword" type="text" maxlength="8" /></td>
        </tr>
        <tr>
            <td>Please type your new password</td>
            <td><input id="newPassword" type="text" maxlength="8" min="8" /></td>
        </tr>
        <tr>
            <td colspan="2"><input id="checkOldPassword" type="button" title="Check New Password" value="Check New Password" onclick="checkPassword()" /></td>
        </tr>
    </table>

</body>

</html>

Let me clarify what I am doing

  1. leftframe.html needs to validate a textbox
  2. Once the left frame has been processed. It needs to notify the parent window, file1.html, so it can load the second frame (topo1.htm)

topo.htm doesn’t exist so the HTA app loads Page could not be found for that specific frame but it should change when we call function getWindowsUserName() from loadOtherFrame. The loadOtherFrame is called from the leftframe.html file as tjscience indicated.

When I run the HTA, the loadOtherFrame is being called (before the button click on leftframe.html)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T01:04:38+00:00Added an answer on June 6, 2026 at 1:04 am

    Edit to include passing text input along to parent page

    You can call a function in the parent page from the frame when the textbox is validated:

    JS IN Leftframe.html

    <script type="text/javascript">
        var validate = function () {
            // validate textbox input ...
            // call parent page function, passing the text from the input
            parent.loadOtherFrame(text);
        };
    </script>
    

    JS in file1.html

    <script type="text/javascript">
        var loadOtherFrame = function (text) {
            // load other frame here ...
        };
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<!DOCTYPE HTML> <html lang=en-US> <head> <meta charset=UTF-8> <title></title> <script type=text/javascript src=http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js></script> <script type=text/javascript> $(function(){
I have following code in html file: <html> <head> <title>My Great Website</title> </head> <body>
I don't understand this, I have this code: <html> <head> <title>Problema</title> <script language=javascript type=text/javascript
My html file: <html> <head><title>RSS Form</title></head> <body> <form method='post' action='write.php'> <img src='logo.png' align='left' />
I have this in my html file: <html> <head> <title> CMD.exe </title> <link rel=stylesheet
Suppose we have the following HTML file: <html xmlns=http://www.w3.org/1999/xhtml> <head> <title>Test iframe download</title> <script
My html page is: <html> <head> <title>Hello there</title> <link href=style.css type=text/css rel=stylesheet /> </head>
I have already included these tags in my html file: <head> <meta property=og:title content=MyTitle/>
html: <html> <head> <title>Home</title> <link rel=stylesheet type=text/css href=qa.css /> </head> <body> <div id=wrap></div> </body>
My main HTML file dynamically loads in content with; <html> <head> <script src=http://code.jquery.com/jquery-1.7.1.min.js></script> </head>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.