IE6 Form and Its Properties After Submit

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • vunet

    #1

    IE6 Form and Its Properties After Submit

    Hello,

    My HTML form submits some values to a hidden iframe. However, this is
    done for file upload fields only. After file uploading is finished I
    am using this form to submit all other data (inputs, textareas, etc.)
    normally.
    The file upload mechanism is structured in the way that it sets form's
    enctype (multipart) and target to iframe dynamically and then resets
    to old values right after submit() method.
    This works ideally in most (maybe almost all) browsers but IE6.
    I learned that for IE6 it is not enctype but rather encoding property
    that needs to be set:

    http://msdn.microsoft.com/en-us/libr...45(VS.85).aspx (see
    Warning on the bottom)

    Fine, but when I set encoding, submit() the form, then I am unable to
    reset the form's properties such as encoding or target in IE6, because
    as I briefly heard IE6 loses its reference to the form after using
    submit().
    I am not sure how true this is because my alerts did show encoding and
    target properties in IE6 which, unfortunately, could not be reset.

    On another hand, I saw that some time pauses need to be applied to
    reset values after submit in IE6 but I am still looking into that.

    I need a solution for this or explanation of why it is happening. If
    anyone is aware of anything to help me move forward please suggest.
    Thanks.
  • dhtml

    #2
    Re: IE6 Form and Its Properties After Submit

    vunet wrote:
    Hello,
    >
    My HTML form submits some values to a hidden iframe. However, this is
    done for file upload fields only. After file uploading is finished I
    am using this form to submit all other data (inputs, textareas, etc.)
    normally.
    The file upload mechanism is structured in the way that it sets form's
    enctype (multipart) and target to iframe dynamically and then resets
    to old values right after submit() method.
    This works ideally in most (maybe almost all) browsers but IE6.
    I learned that for IE6 it is not enctype but rather encoding property
    that needs to be set:
    >
    http://msdn.microsoft.com/en-us/libr...45(VS.85).aspx (see
    Warning on the bottom)
    >
    Fine, but when I set encoding, submit() the form, then I am unable to
    reset the form's properties such as encoding or target in IE6, because
    as I briefly heard IE6 loses its reference to the form after using
    submit().
    I am not sure how true this is because my alerts did show encoding and
    target properties in IE6 which, unfortunately, could not be reset.
    >
    On another hand, I saw that some time pauses need to be applied to
    reset values after submit in IE6 but I am still looking into that.
    >
    I need a solution for this or explanation of why it is happening. If
    anyone is aware of anything to help me move forward please suggest.
    Thanks.
    I can't personally test your code in IE6 but if you post your code here,
    in a simple, reduced example, neatly wrapped at about 72 characters,
    you'll be more likely to get help.

    Garrett

    Comment

    • vunet

      #3
      Re: IE6 Form and Its Properties After Submit

      On Oct 8, 1:38 am, dhtml <dhtmlkitc...@g mail.comwrote:
      vunet wrote:
      Hello,
      >
      My HTML form submits some values to a hidden iframe. However, this is
      done for file upload fields only. After file uploading is finished I
      am using this form to submit all other data (inputs, textareas, etc.)
      normally.
      The file upload mechanism is structured in the way that it sets form's
      enctype (multipart) and target to iframe dynamically and then resets
      to old values right after submit() method.
      This works ideally in most (maybe almost all) browsers but IE6.
      I learned that for IE6 it is not enctype but rather encoding property
      that needs to be set:
      >>
      Fine, but when I set encoding, submit() the form, then I am unable to
      reset the form's properties such as encoding or target in IE6, because
      as I briefly heard IE6 loses its reference to the form after using
      submit().
      I am not sure how true this is because my alerts did show encoding and
      target properties in IE6 which, unfortunately, could not be reset.
      >
      On another hand, I saw that some time pauses need to be applied to
      reset values after submit in IE6 but I am still looking into that.
      >
      I need a solution for this or explanation of why it is happening. If
      anyone is aware of anything to help me move forward please suggest.
      Thanks.
      >
      I can't personally test your code in IE6 but if you post your code here,
      in a simple, reduced example, neatly wrapped at about 72 characters,
      you'll be more likely to get help.
      >
      Garrett
      The code is below and imagine there is a hidden Iframe with
      name="IFRAME_UP LOAD_TARGET":

      VAR IE6 = !!(window.attac hEvent && !window.opera && !
      window.XMLHttpR equest)
      var rememberAction = (form.action) ? form.action : "";
      var rememberTarget = (form.target) ? form.target : null;
      var rememberEnctype = (form.enctype)? form.enctype : null;
      form.action = "page_to_upload _images/"
      form.target = "IFRAME_UPLOAD_ TARGET";//THIS IS HIDDEN IFRAME
      if(ie6)form.enc type = "multipart/form-data";
      else form.encoding = "multipart/form-data";
      form.submit();
      form.action = rememberAction;//change back
      form.target = rememberTarget;
      form.enctype = rememberEnctype ;

      Comment

      • Conrad Lender

        #4
        Re: IE6 Form and Its Properties After Submit

        On 2008-10-08 19:57, vunet wrote:
        VAR IE6 = !!(window.attac hEvent && !window.opera && !
        window.XMLHttpR equest)
        if(ie6)form.enc type = "multipart/form-data";
        else form.encoding = "multipart/form-data";
        "IE6" and "ie6"? Maybe that's just a typo, but you should be aware that
        identifiers are case sensitive.


        - Conrad

        Comment

        • vunet

          #5
          Re: IE6 Form and Its Properties After Submit

          On Oct 8, 2:41 pm, Conrad Lender <crlen...@yahoo .comwrote:
          On 2008-10-08 19:57, vunet wrote:
          >
          VAR IE6 = !!(window.attac hEvent && !window.opera && !
          window.XMLHttpR equest)
          if(ie6)form.enc type = "multipart/form-data";
             else form.encoding = "multipart/form-data";
          >
          "IE6" and "ie6"? Maybe that's just a typo, but you should be aware that
          identifiers are case sensitive.
          >
            - Conrad
          that's just a typo.

          Comment

          Working...