开发者

get query string in popup window

开发者 https://www.devze.com 2023-03-10 00:48 出处:网络
<a href=\"tags.php\" onclick=\"return popitup(\'tags.php\')\">tags</a> I have this line of code that runs the javascript to open new mini popup window,and it mostly works.
<a href="tags.php" onclick="return popitup('tags.php')">tags</a>

I have this line of code that runs the javascript to open new mini popup window,and it mostly works.

Now how could i add current query string attributes so that my popup window has url something like this "tags.php?variable1&variable2"

In few similar places I used this along with some other code to get the query attributes,the problem is that in this case page refreshes and contacts the sql without running javascript or opening window,when i try to make my code PHP using echo the quotation makrs f* everything up. 开发者_StackOverflow

".$_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING']."


return popitup('tags.php'+window.location.search)


return popitup(this.href + window.location.search);

would use the href belonging to the <a> that was clicked, so you don't have to retype it every time.

0

精彩评论

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

关注公众号