Page 2 of 2
Posted: Tue Jun 01, 2004 1:16 pm
by scorphus
You got it right, Pyrite. I'll look if there is a way to catch on-the-fly the URL the frame is being redirected to... Just curious, why that is not an option?
Posted: Tue Jun 01, 2004 1:40 pm
by Pyrite
Well, I am not the one creating the links in the other frame, so I don't know what they are ahead of time.
Posted: Tue Jun 01, 2004 1:51 pm
by feyd
example onlyCode: Select all
<script>
var linkage = document.framesї1].links;
for(var x = 0, j = linkage.length; x < j; x++)
{
if(linkageїx].onload != null)
{
// it has an onload attached.. needs special processing
}
else
{
// it didn't have an onload
linkageїx].onload = ""; // whatever code you need here..
}
}</script>
Posted: Tue Jun 01, 2004 5:34 pm
by scorphus
Nice tips,
feyd.
Fellas, with feyd's tips and dozen changes I came into this:
http://scorphus.no-ip.com/lab/frames2/ . I think it's a bit complicated, but it can become an option. Well, I hope, it took me almost 3/2 hours
Cheers,
Sco.
Posted: Tue Jun 01, 2004 6:17 pm
by scorphus
I made some modifications to not loose changes or have duplicated data when user hits 'Save' button and then goes to another page. Frames3:
http://scorphus.no-ip.com/lab/frames3/
Scorphus.
Posted: Wed Jun 02, 2004 12:45 am
by cgroup
I had attempted to do something similar here:
http://www.fopo.net/south/scripts/timecounter/
It is a counter that tracks how long the person has been on your website and then submits it into an iframe onUnload. The only problem I had was that the page would close before the form finished submitting and the data was saved, so I used an alert to stall long enough for the page to finish loading in the iframe.
Posted: Wed Jun 02, 2004 9:50 pm
by Guilherme Blanco
You simply have to use JavaScript RPC of Paul Whitrow...
Call a javascript function that calls the PHP code to execute.
Look at the link:
http://www.alphafilter.com/go.foo/article/?aid=10/
Regards,