File upload in flash forms
In our CMS the forms need a relook. There are many forms and all built width tables and so on. I decided to experiment with flash forms. Not convinced yet because they are slow to load.
But I wanted to give it a try anyway, but now I need a form with a couple of 'normal' input fields AND a field where people can upload an image. It looks like the flash form doesn't support that. Oh no that can't be true, such a simple feature. Please tell me I am wrong and there is a workaround....
Other question, can I implement the CKeditor in a flash form?
I am also considering redoing the forms with dhtmlx components like you find at http://dhtmlx.com
What would you advise me? I can also go back to the good old forms and really invest in the CSS
Bianca
Since you requested advice, mine is to use html forms.
I gotta say I agree. With JQuery being as mature as it is now, I don't see a very good case for Flash-based forms.
Bianca, do you have a reason for wanting to use Flash forms? If nothing else, you will be preventing anyone who uses IOS from using said forms. I say Apple users bring this sort of thing on themselves, but - rightly or wrongly - they do represent an increasing chunk of the browser market.
Adam
Similar Messages
-
I have a file upload in a form of mine.
I can't style the upload to match the rest of my form. I have tried to target the id="FileAttachment" to no avail. I have tried adding classes and nothing responds.
In Dreamweaver it shows as styled until it gets on the web.
Here is the site: http://ubhape2remodel.businesscatalyst.com/careers
Any Advice?
Thanks!Thanks for the information.
I cannot get it to work and I am unsure why. I am not sure if I am not using the JS right or not adding something to the css. I am a bit confused.
I am not all that good at javascript so I assume something here is off and I am just missing it.
One other note: Is it possible to use my style of buttons and not an image (I would like the hover effect that I use on the buttons to apply to that one as well.) But not sure how this can be done or if it is possible.
Any help would be very very much appreciated.
http://ubhape2remodel.businesscatalyst.com/careers
Thanks! -
How to 'clear' file upload field in forms
In a form I am designing I need a 'clear' or 'reset' button that clears the entire form. This is easy to do, of course, but alas my form has a file upload field, and in Safari I just can't get that field to go back to it's default empty state.
is there a secret way to force file upload fields in safari to reset, or is it just impossible?I've just done a quick search on bugzilla and came up with this http://bugzilla.opendarwin.org/show_bug.cgi?id=8248.
-
JSP : latest JSTL, File Upload from web form Client to Server Question!
I understand that within a JSP, It is possible to read a file from the Client by opening a Stream somehow.
How do I code, within jsp/servlet (non tag) java code inside <% %>
blocks, WITHOUT openening a new connection to the URL, an InputStream from a client web browser form, from a file upload coded using
<input type="file" name="file1"/> ?
I have previously achieved this quite simply with a FileInputStream
with the previous version of JSTL.
How may I do this with the latest version of JSTL, with this index.jsp?
-with a simple text file.
-with a Binary file (with DataInputStream)?
<%--
Document : index
Created on : 27/01/2009, 3:08:32 PM
Author : Zachary Mitchell
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1 align="center">Hello World!</h1>
<form name="form1" method ="POST" >
<table align="center">
<tr>
<td>
<input name="file1" type="file" align="center"></input>
</td>
</tr>
<tr>
<td>
<input type="submit" value="submit" action="index.jsp" ></input>
</td>
</tr>
</table>
</form>
<!--*********************************************************************** -->
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@page import = "java.io.*" %>
<c:if test="${pageContext.request.method=='POST'}">
<%
File fileName = new File(request.getParameter("file1"));
out.println(fileName.toString());
FileInputStream stream = new FileInputStream(fileName);
out.println(stream.toString());
%>
</c:if>
<!--*********************************************************************** -->
</body>
</html>If I have:
<!-- ***********************************************************************************-->
<form name="form1" method="POST" enctype="multipart/form-data">
<input name="file1" type="file"/>
<input name="submit1" type="submit" value="Submit" action="index.jsp"/>
</form>
<!-- ***********************************************************************************-->
and run this in an index.jsp, use browse to select my text file, and click SUBMIT.
I can use:
InputStreamReader reader = new InputStreamReader(new DataInputStream(request.getInputStream()))
BufferedReader bufferedReader = new BufferedReader(reader);
bufferedReader.readLine();...
However, these is some HTML/POST related content around what multiple readLine();
calls return.
Is there an easy way, like using "${param.file1}",
aside from [http://commons.apache.org/fileupload/|http://commons.apache.org/fileupload/],
maybe using servlet style code, to get the File contents from a remote Client,
to the remote Server servlet engine, AVOIDING ANY SUPERFLUOUS CONTENT,
using version 1.12 of the JSTL, JSP 2.0,Tomcat 6?
Just politely, yes, no, and how?
Edited by: Zac1234 on Jan 29, 2009 3:27 AM
Edited by: Zac1234 on Feb 1, 2009 8:29 PM -
Hi,
I have a requirement to create a dynamic form. the input fields for the form come from a database query, and i will be getting back results like:
input field name data type
field1 text
field2 select
field3 attachment
I am facing an issue with the attachment type of fields.
i have tried creating my dynamic form using two different approaches -
1. use the APEX_ITEM apis
2. use htp.p to just output html from a pl/sql anonymous block.
in both the cases, we do not have options to create a file input, not atleast directly.
Can some one guide me on any existing solutions or approaches to this problem ?
Note: i would prefer a solution based on the 2nd approach (using htp.p) since it gives me more flexibility with the other handlings.
APEX_UTIL also doesn't have open APIs for file create, and i also found the radiogroup API not very friendly (did nt get it to work since i moved on to the other approach)
Regards,
RamakrishnanHi, if you want to submit your files, you will need hidden file upload objects in your page. One for each files, so you need to set a limit because you won't be able to submit hundreds of files anyway. Lets say between 5 to 10. Each hidden file upload will have one computation to put the data that will be sent to the server.
iBEGIN
IF wwv_flow.g_f01.COUNT > 0
THEN
RETURN wwv_flow.g_f01 (1);
ELSE
RETURN NULL;
END IF;
END;
Then the only other things you need is an acceptation branching.
You don't need a process to send those files. When your reload your page, a process should remove the file from APEX_APPLICATION_FILES table to your target table.
It's Denes Kubicek's solution ! I suggest you to visit his demo website ! -
File upload problem when form consists of more than 5 elements
Hi,
I noticed some bizarre behaviour that only occurs when going through an ssl proxy
link to httpclusterservlet on our clustered environment, does not occur without
ssl proxy.
I have two different multipart forms One of them has:
1.one file upload field and 7 other input fields
The other one has:
2.one file upload field and 2 other input fields
Number 2 works as expected,
but number 1-- it appears as if my servlet is called twice and the stream is corrupt--
for example it starts of with the boundary, but after the fifth element half it
gets cut off and then my servlet is called again with the remaining elements leaving
off with where it was cut off.
I don't think this is normal behaviour.
Any ideas?
Hi,
I noticed some bizarre behaviour that only occurs when going through an ssl proxy
link to httpclusterservlet on our clustered environment, does not occur without
ssl proxy.
I have two different multipart forms One of them has:
1.one file upload field and 7 other input fields
The other one has:
2.one file upload field and 2 other input fields
Number 2 works as expected,
but number 1-- it appears as if my servlet is called twice and the stream is corrupt--
for example it starts of with the boundary, but after the fifth element half it
gets cut off and then my servlet is called again with the remaining elements leaving
off with where it was cut off.
I don't think this is normal behaviour.
Any ideas?
-
How do I add a file upload to my form?
I need to be able to collect multiple files from a web form in order to keep them together.
Hi DonPhilyaw,
You can add a attach a file button in your form and you can get all the attachments at one place.
Thanks,
Vikrantt Singh -
Uploading a file from a Flash form
Is there a way to create a form in which the user can upload a file (like a pdf) with the click of a button? I do not find any component capable of doing that. I presume this could be done with ActionScript. What would the code be like?
Thanks
Yvanuse the filereference class. sample code is supplied in the help files.
you'll also need to use server-side code to save a file to the server. -
Problems with file uploading servlet, the form action doesnt capture url
Hi, i have one problem. I am working on a project , i have created a servlet that takes uploaded files and processses them and links them back to user to download. The servlet works perfectly from my computer, I am using apache-tomcat-6.0.16 and java 1.6 , I have two forms called encrypt.html and decrypt.html, I will post both of them, now the problem is when somebody access it on the internet while i am running apache, they get a connection was reset on a firefox browser and same stuff on Internet Explorer.
i have checked my server logs and saw nothing unusual there, So please if you can help me, it is my project.
I am pasting html file and error message that other users where getting remotely.
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
<title>Stego Form</title>
<link rel='STYLESHEET' type='text/css' href='encrypt.css'>
</head>
<body>
<center>
<form name='encrypt' enctype='multipart/form-data' method='POST' action='http://localhost:8080/examples/temp2
' accept-charset='UTF-8'>
<input type='hidden' name='sfm_form_submitted' value='yes'>
</input>
<input type='hidden' name='eord' value='e'>
<select name='encryption' size='1'>
<option value='Select an encryption' selected>
Select an encryption
</option>
<option value='DES'>
DES
</option>
<option value='Tripple DES'>
Tripple DES
</option>
</select>
<input type='file' name='overt' size='20'>
<input type='file' name='covert' size='20'>
<input type='submit' name='submit' value='Submit'>
</form>
</center>
</body>
</html>so it works for me even if i access the page with my ip , but for others it doesnt work,
now the user got this xhtml page that i will show, i cant find attach button so i am pasting here.
here is the servlet coding
import java.io.*;
import java.util.*;
import javax.servlet.ServletException;
import javax.servlet.http.*;
import org.apache.commons.fileupload.*;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
public class temp2 extends HttpServlet
FileInputStream fin;
String filenames[] = new String[2],fieldname,fieldval;
String keyfile,IVfile;
String names[] = new String[2];
public temp2()
super();
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
doPost(request, response);
@Override
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
String eord="";
List lst = null;
boolean isMultiPart = ServletFileUpload.isMultipartContent(request);
if (!isMultiPart) // check whether the post request is actually multipart
System.out.println("ERROR NOT MULTIPART");
System.exit(0);
DiskFileItemFactory fif = new DiskFileItemFactory();
ServletFileUpload sfu = new ServletFileUpload(fif);
sfu.setSizeMax(10000000);
try { lst = sfu.parseRequest(request); }
catch (FileUploadException ex)
{ System.out.println("ERROR IN PARSING FILES" + ex); System.exit(0); }
if(lst.isEmpty()) // check whether request is empty
System.out.println("ERROR LIST SIZE NOT GOOD : " + lst.size());
System.exit(0);
Iterator x = lst.iterator();
int i = 0;
FileItem f = (FileItem)x.next();
f = (FileItem)x.next();
System.out.println(f.getFieldName());
if(f.getFieldName().equalsIgnoreCase("eord")) // check hidden field to know the case : encrypt or decrypt
eord = f.getString();
System.out.println(f.getString());
else // if it is not first field exit
System.out.println("Invalid FORM");
System.exit(0);
f = (FileItem)x.next(); // next field
if(f.getFieldName().equalsIgnoreCase("encryption")) // type of encryption des / tdes
fieldname = f.getFieldName();
fieldval = f.getString();
System.out.println(f.getString());
if(eord.equalsIgnoreCase("e")) // if it is encryption form only file required
while(x.hasNext())
f = (FileItem)x.next();
if(!f.isFormField())
int check = f.getName().lastIndexOf(File.separator);
System.out.println(File.separator);
if(check==-1)
System.out.println(f.getName());
System.out.println("Unsupported browser : " + check);
System.exit(0);
File ff = new File("e:\\apache\\webapps\\temp\\"+f.getName().substring(check));
names[i] = ff.getName(); // original file names
try
f.write(ff);
filenames[i] = ff.getAbsolutePath();
// renamed
ff.deleteOnExit();
}catch(Exception e) {System.out.println("Error writing file"+ ff.getAbsolutePath()); System.exit(0);}
i++;
try { System.in.read(); } catch(Exception e) {}
}// endwhile
if(fieldval.equalsIgnoreCase("DES"))
System.out.println("DES 1"+filenames[1]);
javades o = new javades(filenames[1]); // the file to be encrypted
filenames[1] = "e:\\apache\\webapps\\temp\\files\\" + names[1];
System.out.println("should be original" + filenames[1]);
else if(fieldval.equalsIgnoreCase("Tripple DES"))
javatdes o = new javatdes(filenames[1]);
filenames[1] = "e:\\apache\\webapps\\temp\\files\\" + names[1];
System.out.println(filenames[1]);
System.out.println("Calling stego");
filenames[0] = "e:\\apache\\webapps\\temp\\" + names[0];
System.out.println("file 1 "+ filenames[0]);
System.out.println("file 2"+ filenames[1]);
try { System.in.read(); } catch(Exception e) {}
stego s = new stego(filenames[0],filenames[1]);
System.out.println("mainext " + s.mainext);
// encryption done, and new files are loaded, now lets hide
if(s.mainext.equalsIgnoreCase("wav"))
s.encodewav();
System.out.println("Encoded wave");
else if(s.mainext.equalsIgnoreCase("bmp"))
System.out.println("Encoded bmp");
s.encodebmp();
System.out.println("done !");
PrintWriter pr = response.getWriter();
pr.println("Greetings , Your work is done and saved, now download the following files");
pr.println("The secret key file is needed for getting back your hidden file, so download that too");
pr.write("<a href=\"/temp/files/IV.txt\">click here</a>");
pr.write("<br/><a href=\"/temp/files/key.txt\">click here</a>");
pr.write("<br/><a href=\"/temp/files/"+names[0]+"\">click here</a>");
return;
// if it is decryption case
else if(eord.equalsIgnoreCase("d"))
while(x.hasNext())
f = (FileItem)x.next();
if(!f.isFormField())
int check = f.getName().lastIndexOf(File.separator);
System.out.println(File.separator);
if(check==-1)
System.out.println(f.getName());
System.out.println("Unsupported browser : " + check);
System.exit(0);
File ff = new File("e:\\apache\\webapps\\temp\\"+f.getName().substring(check));
// else if ladder to store paths of stegofile keyfile and IVfile
if(f.getFieldName().equalsIgnoreCase("stegofile"))
filenames[0] = ff.getAbsolutePath();
else if(f.getFieldName().equalsIgnoreCase("keyfile"))
keyfile = ff.getAbsolutePath();
else if(f.getFieldName().equalsIgnoreCase("IVfile"))
IVfile = ff.getAbsolutePath();
try
f.write(ff); // writes whole file at once
}catch(Exception e) {System.out.println("Error writing file"); System.exit(0);}
}// endwhile
System.out.println("Calling stego");
System.out.println("file 1 "+ filenames[0]);
stego s = new stego(filenames[0]);
System.out.println("mainext " + s.mainext);
if(s.mainext.equalsIgnoreCase("wav"))
s.decodewav();
System.out.println("Encoded wave");
else if(s.mainext.equalsIgnoreCase("bmp"))
s.decodebmp();
System.out.println("Encoded bmp");
System.out.println("done !");
////// hidden file has been retrieved , now lets decrypt it
System.out.println("ext " + s.ext);
filenames[0] = "e:\\apache\\webapps\\temp\\"+s.filename;
System.out.println(filenames[0]);
System.out.println(keyfile);
System.out.println(IVfile);
if(fieldval.equalsIgnoreCase("DES"))
javades o = new javades(filenames[0],keyfile,IVfile); // the file to be encrypted
filenames[0] = "e:\\apache\\webapps\\temp\\" + ( new File(filenames[0]).getName());
System.out.println("should be original" + filenames[0]);
else if(fieldval.equalsIgnoreCase("Tripple DES"))
javatdes o = new javatdes(filenames[0],keyfile,IVfile);
filenames[0] = "e:\\apache\\webapps\\temp\\" + ( new File(filenames[0]).getName());
System.out.println(filenames[0]);
PrintWriter pr = response.getWriter();
pr.write("Greetings, you have successfully retrieved your hidden file, now download it from here <br>");
pr.write("<a href=\"http://localhost:8080/temp/files/" + (new File(filenames[0]).getName())+"\">Click here</a>");
}and here is the xhtml file the user receives, whe he clicks the submit button,
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html [
<!ENTITY % htmlDTD
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
%htmlDTD;
<!ENTITY % netErrorDTD
SYSTEM "chrome://global/locale/netError.dtd">
%netErrorDTD;
<!ENTITY loadError.label "Problem loading page">
<!ENTITY retry.label "Try Again">
<!-- Specific error messages -->
<!ENTITY connectionFailure.title "Unable to connect">
<!ENTITY connectionFailure.longDesc "&sharedLongDesc;">
<!ENTITY deniedPortAccess.title "This address is restricted">
<!ENTITY deniedPortAccess.longDesc "">
<!ENTITY dnsNotFound.title "Server not found">
<!ENTITY dnsNotFound.longDesc "
<ul>
<li>Check the address for typing errors such as
<strong>ww</strong>.example.com instead of
<strong>www</strong>.example.com</li>
<li>If you are unable to load any pages, check your computer's network
connection.</li>
<li>If your computer or network is protected by a firewall or proxy, make sure
that &brandShortName; is permitted to access the Web.</li>
</ul>
">
<!ENTITY fileNotFound.title "File not found">
<!ENTITY fileNotFound.longDesc "
<ul>
<li>Check the file name for capitalization or other typing errors.</li>
<li>Check to see if the file was moved, renamed or deleted.</li>
</ul>
">
<!ENTITY generic.title "Oops.">
<!ENTITY generic.longDesc "
<p>&brandShortName; can't load this page for some reason.</p>
">
<!ENTITY malformedURI.title "The address isn't valid">
<!ENTITY malformedURI.longDesc "
<ul>
<li>Web addresses are usually written like
<strong>http://www.example.com/</strong></li>
<li>Make sure that you're using forward slashes (i.e.
<strong>/</strong>).</li>
</ul>
">
<!ENTITY netInterrupt.title "The connection was interrupted">
<!ENTITY netInterrupt.longDesc "&sharedLongDesc;">
<!ENTITY netOffline.title "Offline mode">
<!ENTITY netOffline.longDesc "
<ul>
<li>Uncheck "Work Offline" in the File menu, then try again.</li>
</ul>
">
<!ENTITY netReset.title "The connection was reset">
<!ENTITY netReset.longDesc "&sharedLongDesc;">
<!ENTITY netTimeout.title "The connection has timed out">
<!ENTITY netTimeout.longDesc "&sharedLongDesc;">
<!ENTITY protocolNotFound.title "The address wasn't understood">
<!ENTITY protocolNotFound.longDesc "
<ul>
<li>You might need to install other software to open this address.</li>
</ul>
">
<!ENTITY proxyConnectFailure.title "The proxy server is refusing connections">
<!ENTITY proxyConnectFailure.longDesc "
<ul>
<li>Check the proxy settings to make sure that they are correct.</li>
<li>Contact your network administrator to make sure the proxy server is
working.</li>
</ul>
">
<!ENTITY proxyResolveFailure.title "Unable to find the proxy server">
<!ENTITY proxyResolveFailure.longDesc "
<ul>
<li>Check the proxy settings to make sure that they are correct.</li>
<li>Check to make sure your computer has a working network connection.</li>
<li>If your computer or network is protected by a firewall or proxy, make sure
that &brandShortName; is permitted to access the Web.</li>
</ul>
">
<!ENTITY redirectLoop.title "The page isn't redirecting properly">
<!ENTITY redirectLoop.longDesc "
<ul>
<li>This problem can sometimes be caused by disabling or refusing to accept
cookies.</li>
</ul>
">
<!ENTITY unknownSocketType.title "Unexpected response from server">
<!ENTITY unknownSocketType.longDesc "
<ul>
<li>Check to make sure your system has the Personal Security Manager
installed.</li>
<li>This might be due to a non-standard configuration on the server.</li>
</ul>
">
<!ENTITY sharedLongDesc "
<ul>
<li>The site could be temporarily unavailable or too busy. Try again in a few
moments.</li>
<li>If you are unable to load any pages, check your computer's network
connection.</li>
<li>If your computer or network is protected by a firewall or proxy, make sure
that &brandShortName; is permitted to access the Web.</li>
</ul>
">
<!ENTITY % globalDTD
SYSTEM "chrome://global/locale/global.dtd">
%globalDTD;
]>
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
- The Original Code is mozilla.org code.
- The Initial Developer of the Original Code is
- Netscape Communications Corporation.
- Portions created by the Initial Developer are Copyright (C) 1998
- the Initial Developer. All Rights Reserved.
- Contributor(s):
- Adam Lock <[email protected]>
- William R. Price <[email protected]>
- Henrik Skupin <[email protected]>
- Jeff Walden <[email protected]>
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the LGPL or the GPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
- ***** END LICENSE BLOCK ***** -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Problem loading page</title>
<link rel="stylesheet" href="temp2_files/netError.css" type="text/css" media="all"/>
<!-- XXX this needs to be themeable -->
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAANbY1E9YMgAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAICSURBVHjaYvz//z8DJQAggJhwiDPvnmlzc2aR0O+JGezt+AwACCCsBhxfYhn59N41FWtXIxZOLu70niRGXVwGAAQQNgNYHj96O8HaWYdJW5ubwd4/mI2Ng7sblwEAAYRhwMm1URk/vn4SUNWVYGD8+YZBXZOZm5OLzRjoCmNsBgAEEKoBN82Y7l851GLrqMjM8Oc7A8O/3wwMP54wuAQFCXNycUzGZgBAAKEYcOaKZO2/f//5FbUVgBrfMoRVcgHpNwyKGjKMXDwCan0prFboBgAEELIBzDcvXyy2cVZhYPj9GWj7H4jo/38MDJ9OMDj7O/KzsjH3oxsAEEBwA/bNNipiZf7FI6cqwcDw8x2qqp8fGORUpVn4BEXlgGHhhCwFEEAwA9gfP3hdZ+Oizcjw+wvCdjgAuuLrFQbXIH9hTm7uqcgyAAEENuD4ctcebm5mbikFYRTbV7V/Q6j88Z5BSuY7q4CQgAjQFR4wYYAAAhtw89L5ZFsnRaDtn4CW/YXrAQcisit+PGVwDgrnZ2NnnwATBQggpsNLvGYLCAmxi8tLARWg+h3FBVBXSEj/ZZWQkRcCuiIQJAQQQCyvnj5KMDTkZ2JgYmRg4FchnHv+vmEwttLmeXT3VjKQtx4ggFgk5TXebV63UfT3ijOMxOZAVlZWdiB1EMQGCCBGSrMzQIABAFR3kRM3KggZAAAAAElFTkSuQmCC"/>
<script type="application/x-javascript"><![CDATA[
// Error url MUST be formatted like this:
// moz-neterror:page?e=error&u=url&d=desc
// Note that this file uses document.documentURI to get
// the URL (with the format from above). This is because
// document.location.href gets the current URI off the docshell,
// which is the URL displayed in the location bar, i.e.
// the URI that the user attempted to load.
function getErrorCode()
var url = document.documentURI;
var error = url.search(/e\=/);
var duffUrl = url.search(/\&u\=/);
return decodeURIComponent(url.slice(error + 2, duffUrl));
function getDescription()
var url = document.documentURI;
var desc = url.search(/d\=/);
// desc == -1 if not found; if so, return an empty string
// instead of what would turn out to be portions of the URI
if (desc == -1) return "";
return decodeURIComponent(url.slice(desc + 2));
function retryThis()
// Session history has the URL of the page that failed
// to load, not the one of the error page. So, just call
// reload(), which will also repost POST data correctly.
try {
location.reload();
} catch (e) {
// We probably tried to reload a URI that caused an exception to
// occur; e.g. a non-existent file.
function initPage()
var err = getErrorCode();
// if it's an unknown error or there's no title or description
// defined, get the generic message
var errTitle = document.getElementById("et_" + err);
var errDesc = document.getElementById("ed_" + err);
if (!errTitle || !errDesc)
errTitle = document.getElementById("et_generic");
errDesc = document.getElementById("ed_generic");
var title = document.getElementById("errorTitleText");
if (title)
title.parentNode.replaceChild(errTitle, title);
// change id to the replaced child's id so styling works
errTitle.id = "errorTitleText";
var sd = document.getElementById("errorShortDescText");
if (sd)
sd.textContent = getDescription();
var ld = document.getElementById("errorLongDesc");
if (ld)
ld.parentNode.replaceChild(errDesc, ld);
// change id to the replaced child's id so styling works
errDesc.id = "errorLongDesc";
// remove undisplayed errors to avoid bug 39098
var errContainer = document.getElementById("errorContainer");
errContainer.parentNode.removeChild(errContainer);
]]></script>
</head>
<body dir="ltr">
<!-- ERROR ITEM CONTAINER (removed during loading to avoid bug 39098) -->
<!-- PAGE CONTAINER (for styling purposes only) -->
<div id="errorPageContainer">
<!-- Error Title -->
<div id="errorTitle">
<h1 id="errorTitleText">The connection was reset</h1>
</div>
<!-- LONG CONTENT (the section most likely to require scrolling) -->
<div id="errorLongContent">
<!-- Short Description -->
<div id="errorShortDesc">
<p id="errorShortDescText">The connection to the server was reset while the page was loading.</p>
</div>
<!-- Long Description (Note: See netError.dtd for used XHTML tags) -->
<div id="errorLongDesc">
<ul>
<li>The site could be temporarily unavailable or too busy. Try again in a few
moments.</li>
<li>If you are unable to load any pages, check your computer's network
connection.</li>
<li>If your computer or network is protected by a firewall or proxy, make sure
that Firefox is permitted to access the Web.</li>
</ul>
</div>
</div>
<!-- Retry Button -->
<xul:button xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="errorTryAgain" label="Try Again" oncommand="retryThis();"/>
</div>
<!--
- Note: It is important to run the script this way, instead of using
- an onload handler. This is because error pages are loaded as
- LOAD_BACKGROUND, which means that onload handlers will not be executed.
-->
<script type="application/x-javascript">initPage();</script>
</body>
</html>thank you for your prompt reply in advance,
Regards,
Mihir PandyaHi, thank you for your replies, I found out few things about my servlet, and its portability
and i have few questions, although i marked this topic as answered i guess its ok to post
I am using javax.servlet.context.tempdir to store my files in that servletcontext temporary directory. But i dont know how to give hyperlink
of the modified files to the user for them to download the modified files.
What i am using to get the tempdir i will paste
File baseurl = (File)this.getServletContext().getAttribute("javax.servlet.context.tempdir");
System.out.println(baseurl);
baseurl = new File(baseurl.getAbsolutePath()+File.separator+"temp"+File.separator+"files");
baseurl.mkdirs();so i am storing my files in that temp/files folder and the servlet processes them and modifies them, then how to present them as
links to the user for download ?
and as the servlet is multithreaded by nature, if my servlet gets 2 different requests with same file names, i guess one of them will be overwritten
And i want to create unique directory for each request made to the servlet , so file names dont clash.
one another thing is that i want my servlet to be executed by my <form action> only, I dont want the user to simply type url and trigger the servlet
Reply A.S.A.P. please..
Thanks and regards,
Mihir Pandya -
How to keep the page-setting and the extension of a file uploaded to a form
Hi,
I created a form based on table witch contain a blob.
If i upload into it an HTML file, when i load it in a report it look fine. But, if i upload a MSword or PDF file
it display binary characters.
Please help.
Thanks.Hi Scafandri ,
LEAD SELECTION IS A PROPERTY OF A NODE. YOU CAN CHECK AND UNCHECK THAT PROPERTY UNDER NODE PROPERTIES.
OR IF YOU WANT TO SET SELECTED ROW AS LEAD SELECTION THEN USE THE BELOW LINK IT WOULD BE HELPFUL
retreiving the selected row index value
In onclick event of alv table,
first get the index value of selected row using r_param->get_index( ).
Then using this value set lead selection like below
lo_nd_itab->set_lead_selection_by_index ( above index value ).
Then selected row will become the leadselection.
Regards
Srinivas -
Hi,
When i upload a file from <form> ( jsp page ) and send it to my object class(struts,servlet) , the filename �����.doc are replaced by ?????.doc. in the database.
I make few test by adding UTF-8 charset and content type to the jsp but still doesn't work...
Ex :
String encod = request.getCharacterEncoding();
if (encod == null || !encod.equals("UTF-8"))
try
request.setCharacterEncoding("UTF-8");
catch (UnsupportedEncodingException e)
System.err.println("HttpMultipartRequest - : " + e);
It's not a charset problem in the database because i try to do with an input type="text" and its working. It's just not working with the input type="file".
And i also add directly ��� character into the database and its working.
it's will be a pleasure if someone could response to me .
thanks
Jonathanwarnerja,
Not sure why you always play the part of the
cross-post police... Seems like waste of effort to
me.To each his own. I'm not sure why you feel the need
to question my motives. Also not sure why you have
posted requests to Sun regarding forum features...
"Seems like a waste of effort to me.". But I wasn't
going to call you on it.touch�
:-) -
Flash 8 file upload .doc & .pdf help, please
I've been working with the file upload sample that came with
Flash 8 as well
as other sources to help me figure this one out... like:
http://www.flash-db.com/Tutorials/upload/index.php
Everything I seem to find out about file uploading with Flash
specifically
deals with images, but I need to upload .doc & .pdf files
to attach to an
email as part of an employment application process for a site
that is built
with Flash.
The back-end script is a simple ColdFusion file that I've
tested (and works
fine with a static HTML test page):
<cffile action="upload"
destination = "ServerAddressHERE"
accept = "image/jpg, application/msword, application/pdf"
fileField = "Form.resumeFile"
nameConflict = "Overwrite">
The Flash example script that comes with Flash 8 has been
modified as
follows:
System.security.allowDomain(" FQDN_here");
import flash.net.FileReference;
// The listener object listens for FileReference events.
var listener:Object = new Object();
// When the user selects a file, the onSelect() method is
called, and
// passed a reference to the FileReference object.
listener.onSelect = function(selectedFile:FileReference):Void
// Update the TextArea to notify the user that Flash is
attempting to
// upload the image.
statusArea.text += "Attempting to upload " +
selectedFile.name + "\n";
// sample code provided by Flash
selectedFile.upload("
http://www.helpexamples.com/flash/file_io/uploadFile.php");
// my modification here (I have tried absolute references as
well):
selectedFile.upload("upfile.cfm");
listener.onOpen = function(selectedFile:FileReference):Void {
statusArea.text += "Opening " + selectedFile.name + "\n";
// Once the file has uploaded, the onComplete() method is
called.
listener.onComplete =
function(selectedFile:FileReference):Void {
// Notify the user that Flash is starting to download the
image.
statusArea.text += "Downloading " + selectedFile.name + " to
player\n";
// this part is irrelevant to my needs and I've worked with
and without it
imagesCb.addItem(selectedFile.name);
imagesCb.selectedIndex = imagesCb.length - 1;
downloadImage();
var imageFile:FileReference = new FileReference();
imageFile.addListener(listener);
uploadBtn.addEventListener("click", uploadImage);
// this part is irrelevant to my needs and I've worked with
and without it
imagesCb.addEventListener("change", downloadImage);
imagePane.addEventListener("complete", imageDownloaded);
function imageDownloaded(event:Object):Void {
if(event.total == -1) {
imagePane.contentPath = "Message";
// this part is where I added the extensions I need:
function uploadImage(event:Object):Void {
imageFile.browse([{description: "Image Files", extension:
"*.jpg;*.gif;*.png;*.doc;*.pdf,"}]);
ANY ideas would be sincerely appreciated... even if it's just
to confirm
that the Flash file upload process ONLY works with image
files.... Thank you
ALL in advance for ANY help I can get. :-)Did you ever get your issue with the F12, publish preview,
not loading your browser? I have just upgraded from MX 2004 to 8
and now have this issue.
T Peluso
[email protected] -
I realize that FormsCentral does not currently support file uploads (aka attachments) when using a PDF form to submit. In several of this places I've read this, it seems to imply that PDF forms to not support file uploads. I also noticed that when a PDF form is enabled for use with FormsCentral, the submit format is "HTML" (i.e., URL-encoded, or multipart/form-data when file attachments are present). PDF forms do indeed support file uploads in the same way that HTML forms do, so I'm wondering why FormsCentral doesn't allow them with PDF forms. On the form side, all it takes is setting up a text field so it can be used for file selection (Field Properties > Options > [Scroll Long Text] && [Field is used for file selection]) along with the field.browseForFileToSubmit JavaScript method (http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.734.html) with a button. The data is sent in the same format as with an HTML form, so it isn't difficult to process. What's the reason for this limitation, or will this method in fact work? I know that PDF forms can also support attachments two other ways, either as actual file attachments to the PDF or as a files attached as a comments, but these types are not what I'm asking about.
Randy,
Thank you for the reply. I am a bit surprised though, as I recall about 10 years ago modifying a CGI program designed to process HTML form submissions that could included file uploads. I didn't have to change any of the code that parsed the input when it was used with a PDF form that submitted as "HTML", since the format of the POSTed data is the same. I did have to modify the code that generated the response (to return an FDF), but that's a different matter. I think it would be great to support file uploads with PDF forms, as well as submitting as FDF. -
Would like to create a file upload facility in a form based on stored procedure
Hello,
I would like to create a 'File Upload' in a 'form based on stored procedure'. The version of portal that I am running is 3.0.7.6.2. In this version, only 'form based on table' has the ability to upload files. Or is it that I am missing something?
Please let me know if this is possible in higher versions of portal.
Thank you for your help.
JayasreeI have kin od fdone this by using the additem fucntion, if you look at the HTML of the add file page, you can see the parameter that are required for the form.
-
File Upload in Firefox/Safari
I have been trying to do file upload in Flash player 9 (AS3)
using filereference and PHP server-side code. This works fine in
IE, but not in Firefox and Safari. As far a I can ascertain this is
a problem that a lot of people have - the problem seems to be that
the session id is different to the original session id when the
flash player requests a file upload.
We are getting the session id from a javascript function and
passing it into the flash app and appending that session id to the
filereference url, and then the upload PHP script gets this session
id and tries to use it, but to no avail...
I have seen other people post to this forum asking about
uploading to https, which has been going on for a long time... is
this the same problem or is this a different problem.
Testing machines/browsers done using the filereference
upload:
* Win XP:
- Flash player 9.0.115
+ IE 6 -
fine
+ IE 7 -
fine
+ Firefox 2.0.12 -
does not work (receive a fileIO error)
- Flash player 9.0.103
+ Firefox 2.0.12 -
does not work (receive a fileIO error)
- Flash player 9.0.45
+ Firefox 2.0.12 -
does not work (receive a fileIO error)
* Windows Vista:
- AS ABOVE: WIN XP
* Mac OSX:
- Flash player 9.0.115
+ Firefox 2.0.12 -
does not work (receive a fileIO error)
+ Safari 3 -
does not work (receive a fileIO error)
+ Safari 2 -
does not work (receive a fileIO error)
Please help - this is really frustrating.Had exactly the same issue, very frustraing especially on
friday afternoon :)
my movie consists on a main swf that was loading an external
swf in a different directory which contains a form to upload a
file.
when i put them in the same directory i didn't get the I/O
error anymore.
hope that could help
N.
Maybe you are looking for
-
Error in netbeans IDE when creating new file
Hai, I am doing a project in netbeans. When i want to create a new java class in a project i right clicked the project and from the menu i selected the java file. In that dialog box i entered the name of the java file but in the bottom of the dialog
-
Is there an option in N93 to schedule messages?
there was an option in nokia 9300 to scedule messages to be sent at specific time, is this possible in N93 and if not is there any soft ware that can do this? thanks for help
-
Hi, if I want to quickly create a demo from an excel spreadsheet is there anyway to shortcut the process, in a similar way that (for example) you can convert a spreadsheet into XML and use that to model in OBIEE? thanks, Robert.
-
Iphone vibrate only on incoming mail?
I can't get my iphone 5s to only vibrate on incoming email. This is a business phone so I want it to only vibrate when getting new mail.
-
Delivery Channel for Printing version 10.1.3.3.2
hi , Has anyone tried Printing using SQL based bursting.? If yes what is the parameter value of the column DEL_CHANNEL? When i set the value as Printer or Print_Delivery, i get a system message Unknown Delivery Channel with Status as success. When i