Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
pop up window script
Hi i found this pop up window script in an old thread but cant modify it for my needs. not sure of the syntax.
original scritp:
href=<txp:site_url />?parentid=<txp:article_id />" onclick="window.open(this.href, 'popupwindow', 'width=600,height=500,scrollbars,resizable,status'); return false;">Comment</a>
what im trying to do:
<a href= <txp:section name="bigmap" /> onclick="window.open(this.href, 'popupwindow', 'width=600,height=500,scrollbars,resizable,status'); return false;">Open a bigger version of this Map in new window</a>
what happens
http://www.jfl.ie/index.php/Location/
Also i tried to get a regular static script to open a static page in the pop up but that was worse….
sorry if im a needy designer… i cant help it….
Last edited by kvnmcwebn (2007-12-21 04:59:45)
its a bad hen that wont scratch itself.
photogallery
Offline
#2 2007-12-21 11:47:57
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: pop up window script
What if you add the quotes? And add the site url as well:
href="<txp:site_url /><txp:section name="bigmap" />"
Offline
Re: pop up window script
hi els,
tried that still get a 404 in the popup window, thanks.
whats the question mark for:
href=<txp:site_url />?parentid=<txp:article_id />"
its a bad hen that wont scratch itself.
photogallery
Offline
#4 2007-12-22 17:45:37
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: pop up window script
This code is working for me (it doesn’t look much different to yours, apart from a couple of spaces):
<a href="url/to/link/to" onclick="window.open(this.href, 'popupwindow', 'width=500, height=600, scrollbars, resizable'); return false;">linktext</a>
But if you’re getting a 404 in the popup window that doesn’t mean that the code is wrong but more likely that the page doesn’t exist…
Last edited by els (2007-12-22 17:46:55)
Offline
Re: pop up window script
Thanks Els, that works great. I put the relative url in, guess i wasnt using the txp tags properly.
its a bad hen that wont scratch itself.
photogallery
Offline
Pages: 1