[FX.php List] Re: Redirect in Body for Bob

Bob Patin bob at patin.com
Wed Apr 29 10:46:35 MDT 2009


Kevin,

Thanks for the reply; I suspect this is *almost* it, but what is  
happening is that it's trying to load the image (I see a broken  
image), and staying on the same page...

In fact, it's not running the function; I put an ALERT() line in the  
function, but nothing is happening.

Here's my function:



<script language="JavaScript1.2" type="text/javascript">
	function go_now() {
		alert('test');
     	window.location.href = "conf_review.php";
	}
</SCRIPT>

... and here's my code in the BODY of my HTML:

<?php
if($counter < 1){
?>
	<img src="/images/redirect.gif" onload="go_now()" />
<?php
	exit;
}
?>

If I put an echo "OK"; before the "exit;" command, it shows that the  
IF statement is evaluating as TRUE and executing, but the onload isn't  
running the function.

Just to prove that I wasn't crazy, I put the onload command on another  
graphic on the page, and it didn't fire the function either...

Something obvious here, but I'm not seeing it!

Thanks for your help,

Bob Patin




Longterm Solutions
bob at longtermsolutions.com
615-333-6858
http://www.longtermsolutions.com
iChat: bobpatin
AIM: longterm1954
FileMaker 9 Certified Developer
Member of FileMaker Business Alliance and FileMaker TechNet
--------------------------
FileMaker hosting and consulting for all versions of FileMaker
PHP • Full email services • Free DNS hosting • Colocation • Consulting

On Apr 29, 2009, at 10:25 AM, Kevin Becker wrote:

> Hi Bob,
>
> Javascript can do this for you.
>
> In the header include this javascript to establish the function called
> go_now().
>
> <SCRIPT LANGUAGE="JavaScript"><!--
> function go_now () {
>     window.location.href = "http://www.yoururl.com";
> }
> //-->
> </SCRIPT>
>
>
> Then in the body of your page, if $counter < 1
>
> Load an image with onload="go_now()" in the tag like this:
>
> <img src="/images/redirect.gif" onload="go_now()" />
>
>
> Kevin Becker
> FileMaker | Web Developer
> 740-389-4798 ext 250
>
>
> On 4/29/09 11:06 AM, "fx.php_list-request at mail.iviking.org"
> Bob Patin wrote:
>
> > If anyone has a flash of inspiration, please let me know; thanks,
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list

-------------- next part --------------
Skipped content of type multipart/related


More information about the FX.php_List mailing list