SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Form in a form

  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2004
    Location
    England
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Form in a form

    Yes, I know it is not possible so looking for a solution.

    I have a standard form. I also have a file upload form element inside the form; unfortunatly there is no way round it at all, it has to be there.

    What I want is te upload form element and then a button to add the attachment, but i don't want this to submit a form. What will happen is the attachment is submitted to a little popup window, the idea being so that multiple attachments can be added.

    So you can see a solution to do this? The only thing I can think of is submitting the whole form to the little popup but only dealing with the attachment, that would work I guess; but how do i dynamically change the target of a form using js?

    Is there any other solution? Can an form upload element be duplicated? if so when the button is clicked i could clone that element elsewhere with the selection, clone it into another form and then submit that form?

    Any ideas?

  2. #2
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Might want to take a look at how these forums do it: pretty slick. Is that what you need?
    ::: certified wild guess :::

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2004
    Location
    England
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That is what i currently do now, i personally don't like having to load the popup first, it is uncessary IMHO.

  4. #4
    Ding Fries are Done! inter4design's Avatar
    Join Date
    Mar 2003
    Location
    usa
    Posts
    386
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    could possibly iframe the upload option in the form
    DoesItMatter
    - anyone seen my underwear?

  5. #5
    SitePoint Enthusiast
    Join Date
    Jan 2004
    Location
    England
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I fixed this by using the submit button that before submitting the form changes the target to load the popup and then changes the target back. works well


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
  •