form action problem with Firefox

D

Dirk Grosskopf

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(OutFilePath,filter){

popupSrc= "<html>"
+"<form name='popupForm' method='post' action='/FileUpload?action=help'
ENCTYPE='multipart/form-data'>"
+"<center><input type='SUBMIT' value='Upload' name='Upload Selected
Files' /></center>"
+"</form></html>";

popupWin=window.open("javascript:eek:pener.popupSrc",
"pop",
"width=300,height=200,resizable");
}

Has anyone a idea how I get it to work?

Thanks Dirk
 
L

Lee

Dirk Grosskopf said:
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.



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

Dirk Grosskopf

Lee said:
Dirk Grosskopf said:



+"<form name='popupForm' method='post' action='"
+"http://" + location.host + "/FileUpload?action=help' "
+"ENCTYPE='multipart/form-data'>"
Manny thanks!!!
You saved my a...
Dirk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,135
Latest member
VeronaShap
Top