开发者

multiple page_load when using script to set src of iframe

I have a jQuery modal that pops up when a customer clicks on a link on one of my product pages (which is a classic asp store...) This modal contains an Iframe, Within this Iframe sits my .net vb form.

The src= for the Iframe is populated with script when the link is clicked.

when the form is loaded within the Iframe I have a SQL insert on page_load...

For some reason Im getting 3 inserts into the database instead of the one? when I debug my app locally it works perfectly. Can anyone help? Perhaps somone knows a better way of achieving what im trying to do? I want a sexy modal that pops up with my .net form in it from my classic asp page...

<div id='basic-modal'>
<p>
    <br /><br />
    <a href='#' class='basic' onClick="document.getElementById('ifr').src='quote/Public/Default.aspx?PID=<%=pIdProduct%>'">
    This product is available printed with your own design, photo, logo or text! Click here to get a quote. No minimum order quantity from one to millions printed in the UK!
    </a>
   </p>
</div>

<div 开发者_开发技巧id="basic-modal-content">
    <iframe id="ifr" width="850px" height="600px" frameborder="0" scrolling="no" title="Request a quote">
        </iframe>
        <div id="closeButton">
            <a href="javascript:parent.change_parent_url('http://thecleverbaggers.co.uk/store/pc/viewPrd.asp?idproduct=<%=pIdProduct%>');">
            <img src='img/basic/x.png'/>
            </a>
        </div>
</div> 
     <script type="text/javascript">
        function change_parent_url(url)
        {
        document.location=url;
        }       
     </script>

Many thanks for any help.


I think you need to check your html to see if it contains any tag element with empty src as for example images with empty src takes it's src as the current page which initiate another request to the same page check this link http://www.nczonline.net/blog/2009/11/30/empty-image-src-can-destroy-your-site/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜