javascript - Chrome using Lightbox calling server twice -


i'm hoping has come across before. i'm using lightbox retrieve image server. image created @ run time using parameters in url request. now, works fine in browsers. today noticed chrome sending request twice. ie, ff , safari don't this.

using chrome developer's tool network tab see 2 calls made server, first lightbox , second jquery line 7937. using same tool firefox, 1 call made.

from server side, debugged , return image through outputstream. called twice chrome because chrome calls twice. ideas why doing this? ideas appreciated.

code below

<html> <head>     <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.js"></script>     <script type="text/javascript" src="http://localhost/dawn/aeix/js/lightbox.js"></script>         <script type="text/javascript">         $("#display_id").click(function(e){             var urlgetstring = $.param($('#mainform_id').serializearray());             urlgetstring = "http://localhost/show.do?" + urlgetstring;             $("#display_id").attr("href", urlgetstring);         });     </script>    </head>   <body>     <form name="mainform" id="mainform_id" action="http://localhost/report.do">         <!-- lots of input fields here -->          <a id="display_id" href="#" data-lightbox="histogram3">             <button type="button" class="button">display</button>         </a>                                                 </form> </body>  </html> 

solution provided in github helpful user. solution & user info can found below.

https://github.com/lokesh/lightbox2/issues/239#issuecomment-46556681

i tried solution in chrome , working fine. sends data server once. rest of browsers still working before.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -