form action problem with Firefox

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

    #1

    form action problem with Firefox

    Hi
    I'm having the following js problem:
    A webapplication has a page with a button event that pops up a file upload
    dialog.
    this dialog is a form with a locally absolute URL to a webapp '/FileUpload'
    as action
    The problem is, as long as I'm using IE the form action is fired. When I'm
    using Firefox it doesn't work. It only works when I'm using the full
    quallified URL 'http://localhost:8080/FileUpload'. OK this is a workarround,
    but I can not use it because the whole webapp will be installed on multiple
    domains and therefore the hostname must not be static.

    Here's the stripped down Javascript source:

    <script type="text/javascript">

    function popup(OutFilePa th,filter){

    popupSrc= "<html>"
    +"<form name='popupForm ' method='post' action='/FileUpload?acti on=help'
    ENCTYPE='multip art/form-data'>"
    +"<center><inpu t type='SUBMIT' value='Upload' name='Upload Selected
    Files' /></center>"
    +"</form></html>";

    popupWin=window .open("javascri pt:opener.popup Src",
    "pop",
    "width=300,heig ht=200,resizabl e");
    }

    Has anyone a idea how I get it to work?

    Thanks Dirk


  • Lee

    #2
    Re: form action problem with Firefox

    Dirk Grosskopf said:[color=blue]
    >
    >Hi
    >I'm having the following js problem:
    >A webapplication has a page with a button event that pops up a file upload
    >dialog.
    >this dialog is a form with a locally absolute URL to a webapp '/FileUpload'
    >as action
    >The problem is, as long as I'm using IE the form action is fired. When I'm
    >using Firefox it doesn't work. It only works when I'm using the full
    >quallified URL 'http://localhost:8080/FileUpload'. OK this is a workarround,
    >but I can not use it because the whole webapp will be installed on multiple
    >domains and therefore the hostname must not be static.[/color]



    +"<form name='popupForm ' method='post' action='"
    +"http://" + location.host + "/FileUpload?acti on=help' "
    +"ENCTYPE='mult ipart/form-data'>"

    Comment

    • Dirk Grosskopf

      #3
      Re: form action problem with Firefox


      "Lee" <REM0VElbspamtr ap@cox.net> schrieb im Newsbeitrag
      news:d0afi301lf 6@drn.newsguy.c om...[color=blue]
      > Dirk Grosskopf said:[color=green]
      >>
      >>Hi
      >>I'm having the following js problem:
      >>A webapplication has a page with a button event that pops up a file upload
      >>dialog.
      >>this dialog is a form with a locally absolute URL to a webapp
      >>'/FileUpload'
      >>as action
      >>The problem is, as long as I'm using IE the form action is fired. When I'm
      >>using Firefox it doesn't work. It only works when I'm using the full
      >>quallified URL 'http://localhost:8080/FileUpload'. OK this is a
      >>workarround ,
      >>but I can not use it because the whole webapp will be installed on
      >>multiple
      >>domains and therefore the hostname must not be static.[/color]
      >
      >
      >
      > +"<form name='popupForm ' method='post' action='"
      > +"http://" + location.host + "/FileUpload?acti on=help' "
      > +"ENCTYPE='mult ipart/form-data'>"
      >[/color]
      Manny thanks!!!
      You saved my a...
      Dirk


      Comment

      Working...