View Full Version : Function call in iframe

Jan 15th, 2007, 04:17 PM
I have done some searching and I thought I understood how to do this but obviously I am still doing something wrong.

My parent window has an iframe named 'myframe';

in my iframe I have a function that looks like so

function SetLargeImage(SRC)
var idsplit=SRC.split(/_/);
var imageid=idsplit[1];


I need to call this function in the parent window onload so it shows the first image automatically when the page loads for the first time.

So I set the var for the imageid in php above this code here

<script type=\"text/javascript\">

I have alerted the T_".$_GET["imageid"] and it shows what it is supposed to but my function call is not taking the parameter and splitting it and setting the img src = to the result. So I assume the function call is not even happening at all.

So any ideas on what I am doing incorrectly here?

Thank you for any help provided.

Jan 15th, 2007, 11:35 PM
Can you link a sample of the problem?