You are here: Re: preg_match help « PHP Programming Language « IT news, forums, messages
Re: preg_match help

Posted by tihu on 04/25/06 02:34

Lisa wrote:
> when I click on Guidelines, the popup does not apper in
> the window and the page refreshes back to home.
>
> $guideLink = "<a href=\"#\" onclick=\"window.open('guideline.html',
> '_blank', 'left=5, top=10,
> toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,widt­h=300,height=200')\">Guidelines</a>";
>

Hey there

The page is being refreshed because of <a href="#">. coincidentally I
was reading about this problem on
http://www.javascripttoolbox.com/bestpractices/ just before I read your
post. Synchronicity strikes..

The link to "#" is being followed like a normal link (which takes you
to the home page because framesets make urls like href="#" acts like a
link to the main page) as well opening a window.

To stop this happening you need add return false at the end of the
onclick string.

onclick=\"window.open('guideline.html', '_blank', 'left=5, top=10,
toolbar=no, location=no, status=no, menubar=no,
scrollbars=no,resizable=no,widt­h=300,height=200'); return false;\"

Not quite sure why the popup is not opening the right page, the
window.open call looks ok. Try using an absolute url like to see what
happens, like:

window.open('http://gomagnetic.com/gomag/filename.htm','_blank'...

Good luck

Tim

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация