[thelist] calling a php page after a static HTML page loads?

Tom Dell'Aringa pixelmech at yahoo.com
Tue Jan 14 12:25:01 CST 2003


--- shawn allen <shawn at alterior.net> wrote:
> quoth Tom Dell'Aringa:
> > I have an odd request, I need to call a PHP page from a STATIC
> HTML
> > page, AFTER the onLoad() event. Is this in any way possible?
> >
> > What I have is a order confirmation page. I have a cookie in JS
> in
> > this page that has built a url like so:
> >
> > mypage.php?track=true;id1=5&id5=6
> >
> > I need to track this info. The confirmation page is NOT a php
> page at
> > all. All I can do is manipulate JS/HTML code in that page.
>
> Have you considered an image bug?
>
> <img src="mypage.php?track=true;id1=5&amp;id5=6" width="1"
> height="1"
> alt="" />

I have been trying that. The problem is I can't seem to get the src
dynamically written to the IMG tag from JS where its timed right so
that when the IMG tag loads, it calls the right PHP page.

For example, I have this code in the middle of my page:

<!--############### Registry tracking ###################-->
<script language="javascript">
var qs = "track.php?t=true";
cookies = document.cookie.split(";");

	for(i=0;i<cookies.length;++i)
	{
		if(cookies[i].indexOf('pid') != -1)
		{
			thisCookie = cookies[i].split("=");
			qs += "&" + thisCookie[0] + "=" + thisCookie[1];

		}
	}
document.write("<img src='"+qs+"' border='0' width='0' height='0'
name='track' />")
</script>
<!--############### Registry tracking ###################-->

Unless there is something wrong with my doc write..this doesn't work.
It seems like it should. I know that the system that outputs the code
I am working with is not good, for example there are two sets of HTML
tags... but I would think this would work.

Tom

=====
var me = tom.pixelmech.webDeveloper();

http://www.pixelmech.com/
http://www.maccaws.com/
[Making A Commercial Case for Adopting Web Standards]

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



More information about the thelist mailing list