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 6212003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:26:08+00:00 2026-05-24T06:26:08+00:00

parent.html : OnClick=popup(); 1. page opens and displays contents 2. but js function isn’t

  • 0

parent.html : OnClick="popup();"

1. page opens and displays contents
2. but js function isn’t working. js function is defined in js file.
3. i checked using firebug, js file loded successfully.
4. it only works after refreshing the page. Any idea please? what am i making mistake?
js function :

<script>
    function popup(){
     var test = "<html><head>";
         test += "<script src= " + '"'+"jqueryTestfile.js"+'"'+ "> <" + '/' + "script>";
         test += "</head><body>";
         test += "<div id=" + '"' +"anyId" + '"' + ">";
         test += "</div>";
         test += "</body></html>"; 
     win.document.write(test);    
    }
    </script>

child pop-up and source code looks like :

<html> <head> 
   <script src = "jQueryTestFile.js"> </script>
 </head> <body> <div id = "anyId">
    some content here ...
 </div> </body> </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-05-24T06:26:08+00:00Added an answer on May 24, 2026 at 6:26 am

    I resolved my problem after a no. of attempt and would like to share :

    <script type="text/javascript">
        window.document.close();
    </script>
    

    Why were not js functions working even after downloading the files : because of i was opening (pop up) a new window using window.document.write() and this method was causing the problem so i used window.document.close() to force a page to ‘finish loading’.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

popup.html is popped up by script from parent.html: window.open('popup.html', '', 'width=520, height=300,left=500,top=0'); Is it
My HTML: <div id="parent"> <div id="child">cx</div> </div> When I use jQuery $('#parent').mouseout(function(){ //something here
I have this script on my html page: <script language='javascript'>parent.resizeTo(550,510);</script> I'd like to add
Javascript function changeInitial(init,alter) { <!--alert(alter);--> init.parent().hide(); alter.parent().show(); } Html <div class=form_item> <div class=form_label> <label>Account</label>
The onclick function is not working properly as it is disabling all the links
I have this html: <div class=foo parent> <div class=child></div> </div> with some css: .foo{
$(this).parent().parent() .children(this.attr(tagName).toLowerCase()) .css(background-color, yellow); xpath: /html/body/div/table/tr/td/b/a $(this).tagName is Anchor <a> the problem with this
Having problems with IE8... I have a button that onclick fires the showImageBrowser() function.
Unobtrusive JS suggests that we don't have any onclick attributes in our HTML templates.
I have a 2-frame HTML page: FrameA contains a list of links to various

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.