使用查询sql Jquery重新加载弹出窗口

我需要帮助马动物网站

我需要启动一个弹出窗口(没关系)

 

和Jquery

 $(document).on('click', '.refresha', function(e) { var url = //How take url in a php file with a query ? var windowName = $( this ).data( 'id' ); var windowSize = windowSizeArray[$(this).attr("rel")]; windowvote = window.open(url, windowName, windowSize); windowvote.moveTo(600, 0); var timer = setInterval(function() { if(windowvote.closed) { $("#protecAnimaux").val('fenêtre fermée avant 10 secondes...'); clearInterval(timer); }else{ // After timer, i need popup is reload with a new link obtain by the php file with the query sql. $.ajax({ type: "POST", url: "link.php", data: url, success: function(){ windowvote.reload(); } }); $("#protecAnimaux").val('fiche animaux test!!'); clearInterval(timer); } }, 3000); }); 

在计时器之后,我需要使用查询sql通过php文件获取的新链接重新加载弹出窗口。

非常感谢您的帮助。

我可以回答代码中隐藏的问题:

 var url = //How take url in a php file with a query ? 

您可以在输入标记中存储url:

  rel="0" data-target="_blank" class='refresha' id='refresha' value=' Lancer protec animaux'/> 

你可以用jQuery这样得到它:

 $(document).on('click', '.refresha', function(e) { var url = $(this).data('url'); ...