SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jul 2008
    0 Post(s)
    0 Thread(s)

    Urgent Help Needed - Iframe

    I am passing variables from parent page to child page and really need help.

    I have to "pull" the variable on the child page from parent - I can't push with variables in the URL.

    So here is my parent page

    <script type="text/javascript">
    function populate(){
    parent.frames['frame1'].document.getElementById('var1').innerHTML = "Larry";
    parent.frames['frame1'].document.getElementById('var2').innerHTML = "Giebelhaus";
    parent.frames['frame1'].document.getElementById('var3').innerHTML = "gieb@yahooDOTcom";


    <iframe name="frame1"
    style="border: 0px solid ;" src="popup1/triggers/mypurl1.htm"
    onload="populate()" align="top" frameborder="0"
    height="400" scrolling="no" width="540"></iframe>

    Okay that is fine for 5 of the 8 Child Pages that I have. The three that are not working are opt-in page, Video Page (pass in parameters into the video), and another Javascript Page.

    Page 1 - www*mypurlpostcardDOTcom/popup1/triggers/mypurl2.htm - if you do a view source and search for "mark" I actually need to pass in "var1" from the parent page here? It is not working?

    Page 2 - www*mypurlpostcardDOTcom/popup1/triggers/mypurl3.htm - I need to pass in "var1" "var2" to the name field and "var3" to the email field.

    Page 3 www*mypurlpostcardDOTcom/popup1/triggers/mypurl5.htm - I need to pass in "var1" where you see Mark and "var2" where you see Rosenberger.

    If someone can help that would be great.

    I was using

    parent.frames['frame1'].document.form2.from.value = '';
    parent.frames['frame1'] = 'Larry Giebelhaus';

    in my parent page and that worked fine for the mypurl3.htm page but then the other pages didn't work.

    Here is a page that works
    www*mypurlpostcardDOTcom/popup1/triggers/mypurl1.htm - see how I am using "var1"

    Again the parent page and iframe call has to be the same for all.

  2. #2
    SitePoint Member
    Join Date
    Jul 2008
    0 Post(s)
    0 Thread(s)

    My parent and child pages are HTML based


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts