Recent Topics

1 Mar 25, 2005 14:10    

Sometimes I want links (images) within a published post to open as a popup window with predefined width/height/scrollbars etc. Normally I do this with javascript, but b2evo doesnt seem to like it. I get: Invalid URI format. The javascript code is fine, no missing elements.

I know b2evo uses popup_comments_window() for popup comments, I use it myself. Is it possible to use this to open a url/uri other than _popup.php? Or is there another way to do it?

[sidenote: target="_blank" is not what I'm looking for]

2 Mar 25, 2005 16:51

open conf/_formatting.php, find a line that looks like :-
'a' => A_attrs.' charset type href hreflang rel rev shape coords target', // Transitional

and change it to :-
'a' => A_attrs.' charset type href hreflang rel rev shape coords target onclick', // Transitional

Then use :-
<a href="" onclick=",'','menu=no etc');return false">Click me</a>


3 Mar 25, 2005 17:29

Thanks! It works great :]

After playing around a little I found it works fine in Firefox but not in IE6. IE just opens a maximized window within the same page. I know it's weird. Plus I was wondering is there a shorter way to do this? I mean it's a pain in the ass typing all that everytime I want a link to popup.

4 Mar 26, 2005 10:30

You could write a javascript function to open the window, which would reduce the amount of typing for each link :-
<script type="text/javascript">
function openIt(ypAnchor){,'','required features');
return false;

Your anchor then becomes :-
<a href="" onclick="return openIt(this)">Click me</a>


5 Mar 26, 2005 11:06

The non javascript popup works fine in IE 6 SP2 XP!! You can always just save the script as a template and simply change the variables.

Form is loading...

CMS + forums – This forum is powered by b2evolution CMS, a complete engine for your website.