打开模态并将URL发送到iFrame

时间:2019-05-22 03:23:56

标签: javascript jquery css

我需要将包含一些字符串数据的URL发送到名为“ galiframe”的iframe。这是一个基本的图像库,因此,在到Modal的链接中,我需要发送诸如图像名称及其物理地址之类的东西,以及其他一些项目来标识用户ID,请求#,麦克风...。打开Modal的jQuery链接不允许我执行此操作。有什么建议吗?附言我正在使用经典的.asp和jQuery css ...尽量不要笑...我老了,我的代码也是如此。

<!-- Remember to include jQuery :) -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>

<!-- jQuery Modal -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.css" />
</head>
<body>
    <style>
     body {font-family: Arial, Helvetica, sans-serif;}

     /* The Modal */
     .modal {
       background-image: url("bgimg.png");
       background-repeat: no-repeat;
       background-color: #5DADE2;
       width: 80%;
       -webkit-animation-name: animatetop;
       -webkit-animation-duration: 0.4s;
       animation-name: animatetop;
       animation-duration: 0.4s
       border-radius: 10px;
       box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    }

     /* Add Animation */
     @-webkit-keyframes animatetop {
     from {top:-300px; opacity:0} 
     to {top:0; opacity:1}
    }

     @keyframes animatetop {
     from {top:-300px; opacity:0}
     to {top:0; opacity:1}
    }

    /* iframes Container */
    .frameset {
      display:inline-block;
      width: 100%;
      border: 0;
     }
   </style>
   <div id="ex1" class="modal">
      Image Gallery
      <div class="frameset">
        <iframe src="" name="galiframe"></iframe>
        <iframe src="listimg.asp" name="listframe"></iframe>
      </div>
    </div>

    <!--- Attach link from img to open the modal --->
    <!---Also sending URL to galliframe for img retrieval --->

    <a href="#ex1" rel="modal:open">URL, Edit this image</a>
    <a href="#ex1" rel="modal:open">URL, Edit a different image</a>

0 个答案:

没有答案