[FX.php List] javascript imagemap disables php header

Kevin Futter kfutter at sbc.melb.catholic.edu.au
Mon Dec 4 19:54:07 MST 2006


On 5/12/06 1:37 PM, "Joel Shapiro" <jsfmp at earthlink.net> wrote:

> Hi all
> 
> I've had to place my client's navigation system into my FX.php
> solution (which is one part of their whole site).  Their navigation
> uses an imagemap that displays submenus via javascript (I did not
> develop this).  I've put their image, imagemap coding, and javascript
> calls into a single include file, which I've placed into my php
> files.  This works fine in *most* places on my site.  However...
> 
> I have one page that calls a php header in a certain situation, and
> it fails (does not move to the called page) when the client's
> navigation system is on the page.  I've narrowed it down to the
> imagemap coding itself (see below).  (I tested by removing one part
> at a time and seeing when the header stopped working.)
> 
> Other pages on the site call headers without problems, and the
> include has another imagemap without javascript, which is also fine.
> 
> Any thoughts on how I can get my header call to work?  (it just stops
> on the original page instead of moving on to the called header page:
> header('Location: page.php');

I haven't looked closely at the code in question, but one thought does come
to mind: make sure you are exiting your PHP script immediately after any
location headers are sent, as it will still process the rest of the page
thereafter otherwise. Example:

header('Location: page.php');
exit;

This *could* be the source of your problem, but most likely not. Worth a
mention anyway.

-- 
Kevin Futter
Webmaster, St. Bernard's College
http://www.sbc.melb.catholic.edu.au/



------------------------------------------
This e-mail and any attachments may be confidential.  You must not disclose or use the information in this e-mail if you are not the intended recipient.  If you have received this e-mail in error, please notify us immediately and delete the e-mail and all copies.  The College does not guarantee that this e-mail is virus or error free.  The attached files are provided and may only be used on the basis that the user assumes all responsibility for any loss, damage or consequence resulting directly or indirectly from the use of the attached files, whether caused by the negligence of the sender or not.  The content and opinions in this e-mail are not necessarily those of the College.




More information about the FX.php_List mailing list