New call-to-action
Results 1 to 7 of 7

Thread: Javascript error when clicking on background of window to close

  1. #1
    Member
    Real Name
    David Fricke
    Join Date
    Sep 2011
    Location
    Kenosha, WI
    Posts
    478

    Default Javascript error when clicking on background of window to close

    I have a web application that has a simple container window that opens, and the window properties are set to close the window when you click on the background around the window. Easy, right?

    Well, I have a Freeform Layout region that has HTML code in it to generate a menu for the website. When I click on that part of the background, I get the javascript error shown in the image.

    GRAPHICS-0120.png

    There's nothing really special about the html.

    Code:
    <div class="navbar navbar-default navbar-static-top">
      <div class="container">
        <div class="navbar-header">
          <button class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse" >
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class=navbar-brand href="/"></a>
        </div>
        <div class="navbar-collapse collapse">
          <ul class="nav navbar-nav">
            <li><a href="/">Home</a>
            <li class="dropdown menu-large">
              <a class=dropdown-toggle href="/productlist.a5w"  data-toggle="dropdown"> Products <b class="caret"></b> </a>
              <ul class="dropdown-menu megamenu">
                <li class="row">
                  <div class="col-sm-6 col-md-3">
                    <a class=thumbnail href="productlist.a5w">
                      <img src="http://placehold.it/150x120" >
                    </a>
                  </div>
                  <div class="col-sm-6 col-md-3">
                    <a class=thumbnail href="#">
                      <img src="http://placehold.it/150x120" >
                    </a>
                  </div>
                  <div class="col-sm-6 col-md-3">
                    <a class=thumbnail href="#">
                      <img src="http://placehold.it/150x120" >
                    </a>
                  </div>
                  <div class="col-sm-6 col-md-3">
                    <a class=thumbnail href="#">
                      <img src="http://placehold.it/150x120" >
                    </a>
                  </div>
                  <div class="col-sm-6 col-md-3">
                    <a class=thumbnail href="#">
                      <img src="http://placehold.it/150x120" >
                    </a>
                  </div>
                  <div class="col-sm-6 col-md-3">
                    <a class=thumbnail href="#">
                      <img src="http://placehold.it/150x120" >
                    </a>
                  </div>
                  <div class="col-sm-6 col-md-3">
                    <a class=thumbnail href="#">
                      <img src="http://placehold.it/150x120" >
                    </a>
                  </div>
                  <div class="col-sm-6 col-md-3">
                    <a class=thumbnail href="#">
                      <img src="http://placehold.it/150x120" >
                    </a>
                  </div>
                </li>
              </ul>
            <li class="dropdown menu-large">
              <a class=dropdown-toggle href="#"  data-toggle="dropdown">Categories <b class="caret"></b></a>          
              <ul class="dropdown-menu megamenu row">
                <li class="col-sm-3">
                  <ul>
                    <li class="dropdown-header">Software 
                    <li><a href="#">Desktop</a>
                    <li class="disabled"><a href="#">Mobile</a>
                    <li><a href="#">Tablet</a>
                    <li class="divider">
                    <li class="dropdown-header">Hardware 
                    <li><a href="#">Arduino</a>
                    <li><a href="#">Raspberry PI</a>
                    <li><a href="#">VoCore</a>
                    <li><a href="#">Banana PI</a></li>
                  </ul>
                <li class="col-sm-3">
                  <ul>
                    <li class="dropdown-header">Nano-Tech 
                    <li><a href="#">AFM</a>
                    <li><a href="#">STM</a>
                    <li><a href="#">Nano-Tubes</a>
                    <li><a href="#">Nano-Wires</a>
                    <li><a href="#">Materials</a>
                    <li class="divider">
                    <li class="dropdown-header">A.I. 
                    <li><a href="#">Artificial Intelligence</a></li>
                  </ul>
                <li class="col-sm-3">
                  <ul>
                    <li class="dropdown-header">SaaS 
                    <li><a href="#">On-Demand</a>
                    <li><a href="#">No Software</a>
                    <li><a href="#">Cloud Computing</a>
                    <li class="divider">
                    <li class="dropdown-header">On-Premise 
                    <li><a href="#">Data Center</a>
                    <li><a href="#">Hosting Environment</a>
                    <li><a href="#">Internal IT</a></li>
                  </ul>
                <li class="col-sm-3">
                  <ul>
                    <li class="dropdown-header">Server-Side 
                    <li><a href="#">PHP</a>
                    <li><a href="#">Java</a>
                    <li><a href="#">Python</a>
                    <li><a href="#">Ruby</a>
                    <li><a href="#">ColdFusion</a>
                    <li><a href="#">ASP.NET</a>
                    <li><a href="#">GO</a>
                    <li><a href="#">Perl</a>
                    <li><a href="#">Lasso</a></li>
                  </ul>
                </li>
              </ul>
    		<li class="dropdown menu-large">
              <a class=dropdown-toggle href="#"  data-toggle="dropdown">Services <b class="caret"></b></a>          
              <ul class="dropdown-menu megamenu row">
                <li class="col-sm-3">
                  <ul>
                    <li class="dropdown-header">Web Design 
                    <li><a href="#">HTML5</a>
                    <li class="disabled"><a href="#">CSS</a>
                    <li><a href="#">JavaScript</a>
                    <li class="divider">
                    <li class="dropdown-header">Web Development 
                    <li><a href="#">Websites</a>
                    <li><a href="#">Mobile Apps</a>
                    <li><a href="#">Responsive</a>
                    <li><a href="#">Web Apps</a></li>
                  </ul>
                <li class="col-sm-3">
                  <ul>
                    <li class="dropdown-header">Graphic Design 
                    <li><a href="#">PSD</a>
                    <li><a href="#">Images</a>
                    <li><a href="#">Logos</a>
                    <li><a href="#"></a>
                    <li><a href="#">Vertical variation</a>
                    <li class="divider">
                    <li class="dropdown-header">Database Design 
                    <li><a href="#">Single button dropdowns</a></li>
                  </ul>
                <li class="col-sm-3">
                  <ul>
                    <li class="dropdown-header">UI/UX Design 
                    <li><a href="#">User Interface</a>
                    <li><a href="#">User Experience</a>
                    <li><a href="#">Web Designers</a>
                    <li class="divider">
                    <li class="dropdown-header">Digital Marketing 
                    <li><a href="#">Paid</a>
                    <li><a href="#">Social</a>
                    <li><a href="#">Content Marketing</a></li>
                  </ul>
                <li class="col-sm-3">
                  <ul>
                    <li class="dropdown-header">Project Management 
                    <li><a href="#">Initiating</a>
                    <li><a href="#">Planning</a>
                    <li><a href="#">Executing</a>
                    <li><a href="#">Monitoring</a>
                    <li><a href="#">Controlling</a>
                    <li><a href="#">Closing</a>
                    <li><a href="#">PM Systems</a>
                    <li><a href="#">Best Practices</a>
                    <li><a href="#">Project Manager</a></li>
                  </ul>
                </li>
              </ul>
    		<li><a href="cart.a5w">View Cart</a></li>
          </ul>
        </div>
      </div>
    </div>
    Any ideas?

  2. #2
    Member
    Real Name
    Matthew Shoemate
    Join Date
    Sep 2019
    Posts
    26

    Default Re: Javascript error when clicking on background of window to close

    No. I get the same or similar error when I have close on background checked to enabled.. The workaround is to disable it. I have not figured out what the issue is, I first thought it was a Phonegap issue but eventually found the issue in Working Preview as well.

    I would love to know how to fix it or if it is a bug in the 5667 build. It isn't in your HTML - it's from the JS generated from Alpha, I believe. The source points to the error located in a A5 JS file.

    It is very, very annoying and I'm glad I'm not the only one who has this error.

  3. #3
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,310

    Default Re: Javascript error when clicking on background of window to close

    Quote Originally Posted by mshoemate View Post
    No. I get the same or similar error when I have close on background checked to enabled.. The workaround is to disable it. I have not figured out what the issue is, I first thought it was a Phonegap issue but eventually found the issue in Working Preview as well.

    I would love to know how to fix it or if it is a bug in the 5667 build. It isn't in your HTML - it's from the JS generated from Alpha, I believe. The source points to the error located in a A5 JS file.

    It is very, very annoying and I'm glad I'm not the only one who has this error.
    please send a test case to Alpha. based on your description, we built out own test case and as you will see that works as expected

    http://aadocuments.s3.amazonaws.com/windowclose.a5wcmp

  4. #4
    Member
    Real Name
    David Fricke
    Join Date
    Sep 2011
    Location
    Kenosha, WI
    Posts
    478

    Default Re: Javascript error when clicking on background of window to close

    My test case is enroute.

  5. #5
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,310

    Default Re: Javascript error when clicking on background of window to close

    thanks for sending the test case,

    the cause of your problem is the 3rd party HTML that you have inserted into the freeform html container.


    your test component is not illustrating any AA bug.

  6. #6
    Member
    Real Name
    David Fricke
    Join Date
    Sep 2011
    Location
    Kenosha, WI
    Posts
    478

    Default Re: Javascript error when clicking on background of window to close

    It was me. I admit it. And I actually learned something today. Thanks, Selwyn!

  7. #7
    Member
    Real Name
    David Fricke
    Join Date
    Sep 2011
    Location
    Kenosha, WI
    Posts
    478

    Default Re: Javascript error when clicking on background of window to close

    Matthew, my problem was simply the div z-index, of which I never knew existed. It's like layering in Illustrator. Higher the number, closer to the front. Lower, to the back. Without a z-index, it just picks what it wants. And it was going in front of my window. Interesting property that I'm sure I will now use in the future.

Similar Threads

  1. Can i prevent dialog window close, or capture the click on the close button?
    By WindForce in forum Application Server Version 11 - Web/Browser Applications
    Replies: 2
    Last Post: 11-26-2014, 04:39 AM
  2. Replies: 0
    Last Post: 04-04-2014, 06:53 AM
  3. Form error when double clicking on form object on forms window
    By rlgiordano in forum Alpha Five Version 11 - Desktop Applications
    Replies: 3
    Last Post: 04-22-2012, 06:39 PM
  4. Is there a way to disable window (X) close button using javascript
    By Toby Locke in forum Application Server Version 10 - Web/Browser Applications
    Replies: 2
    Last Post: 01-10-2012, 06:05 PM
  5. Close "parent" browser window after closing javascript popup
    By Jay Talbott in forum Application Server Version 10 - Web/Browser Applications
    Replies: 4
    Last Post: 03-15-2010, 11:52 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •