SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jul 2008
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    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";

    }
    </script>

    <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 = 'gieb@yahoo.com';
    parent.frames['frame1'].document.form2.name.value = '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
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    FYi

    My parent and child pages are HTML based


Bookmarks

Posting Permissions

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