SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot JordanTLClive's Avatar
    Join Date
    Feb 2001
    Location
    Las Vegas, NV
    Posts
    118
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Upload form, return data to parent window

    I am writing a script that includes the ability to let users upload a photo if they want. They click a link, which spawns a new window. What I want to happen, is have the name generated after uploading the file in the remote window, to be returned to the parent window to a form element. The page is at http://www.hotmusicstars.com/teenfind/addprofile.html

    Thanks in advance
    -Jordan

  2. #2
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In javascript, opener references the parent window, so you would need to do something like: onSubmit="opener.document.formName.field.value = document.currentForm.anotherField.value"

  3. #3
    SitePoint Zealot JordanTLClive's Avatar
    Join Date
    Feb 2001
    Location
    Las Vegas, NV
    Posts
    118
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok that worked great thanks!
    Also what would I put in the body tag to make this happen when the window is closed? I want to make sure that when this window is closed, the photo url gets to the correct portion of the form no matter what.


    [edit]
    Nevermind I got it to work I had onClose instead of onUnload in the body tag. Stupid me
    Last edited by JordanTLClive; Jun 2, 2001 at 18:09.
    -Jordan


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
  •