Iframe, Javascript, and PHP Tutorial
Posted: Sat Jun 12, 2004 11:06 am
decided to remove this. Is now considered obsolete and should be instead replaced by an Ajax or XAjax tutorial..
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
You check that?What you need to have/know before reading this tutorial :
1) PHP & HTML
2) Basic calling and naming conventions of Javascript.
3) A web server and php installed.
4) A browser that supports iframes and javascript ( Note : I do not cover Netscape, only I.E. Netscape users will need to do research on the ilayer tag. this is not a very hard subject, i just chose not to lengthen this tutorial more than I already have.. The IE version recommended is 5.0+)
Code: Select all
function ProcessAccount()
{
var Email = '<?=$email_address; ?>';
var Name = '<?=$firstname; ?>';
var Surname = '<?=$lastname; ?>';
window.parent.LoadTopFrame(Email,Name,Surname);
}
window.onload = ProcessAccount();Code: Select all
window.onload = function ProcessAccount()
{
var Email = '<?=$email_address; ?>';
var Name = '<?=$firstname; ?>';
var Surname = '<?=$lastname; ?>';
window.parent.LoadTopFrame(Email,Name,Surname);
}This was due to an error on my part. When I first wrote this article, I just kinda zoomed through the code.. Since I'm used to php's function calls (ie, myfunction() ), i kind of implimented it with javascript. Sometimes this is ok, but when using a window.onload = myfunction(); command, this does not work and generates that type of error.Zooter wrote:and now it works, but just doesn't give the "Not implemented" error. But why?
Thanks
Code: Select all
parent.top.myform.Account.value = Account;
parent.top.myform.fName.value = Name;
parent.top.myform.Address.value = Address;Code: Select all
myform.Account.value = Account;
myform.fName.value = Name;
myform.Address.value = Address;