Input type hidden

What is the html equivalent for input type=hidden in netui tags, where in one can
give a name value pair.
thanks..

"Shankar B" <[email protected]> wrote:
>
I cannot use netui:anchor, as I am submittig a form using javascript.
hence need
to post some hidden values. How do we do hidden name balue pair inside
netui
form.
"Darryl" <[email protected]> wrote:
"Shankar B" <[email protected]> wrote:
What is the html equivalent for input type=hidden in netui tags, where
in one can
give a name value pair.
thanks..I've used a netui:anchor tag with a nested netui:parameter tag thatpassed
the
"hidden" field to an action in the pageflow. In the pageflow, use the
getRequest
method as below...
IN JSP:
<netui:anchor action="toNextInCatalog"><%=category.getName()%>
<netui:parameter name="categoryName" value="<%=category.getName()%>"></netui:parameter>
</netui:anchor>
IN PAGEFLOW:
String catName = this.getRequest().getParameter("categoryName");
hope this helps,
D
There is a <netui:hidden> tag which is intended to have an equivalent to the HTML
hidden fields. However I couldn't achioeve to set a defaultValue ([dataInput="dataInput"].

Similar Messages

  • Upload file input type="hidden" to server

    I have a file that is on a user machine. The file is always in the same location. I want to have the user click on an upload button without selecting a file and have it sent to the server for processing. I have tried to use <input type="hidden" name="fileupload" value="c:\filepath">. When I run it this way I get no file found. Please help!

    I am sorry, I will move it. Didn't notice it was in Acrobat, I was wanting Coldfusion.
    Edit: Since I am unaware of how to move it I'm just going to mark it as answered.

  • HELP INPUT TYPE = hidden  values SEEN IN URL QUERY STRING!!!

    Trying to do session management using hidden fields.
    The fields that are suppose to be hidden show up in the query string of the URL.
    I have included the code, the output to the web page
    and the URL with the "hidden" fields please help.
    HIDDEN FIELDS IN URL QUESRY STRING
    http://localhost:8080/myApp/servlet/Servlet077?firstName=Sandra&item=Michael
    WEB PAGE OUTPUT
    Enter a name and press the button
    Name:
    Your list of names is:
    Michael
    Sandra
    JAVA SOURCE CODE
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Servlet077 extends HttpServlet{
    public void doGet(HttpServletRequest req,
    HttpServletResponse res)
    throws ServletException, IOException{
    //An array for getting and saving the values contained
    // in the hidden fields named item.
    String[] items = req.getParameterValues("item");
    //Get the submitted name for the current GET request
    String name = req.getParameter("firstName");
    //Establish the type of output
    res.setContentType("text/html");
    //Get an output stream
    PrintWriter out = res.getWriter();
    //Construct an HTML form and send it back to the client
    out.println("<HTML>");
    out.println("<HEAD><TITLE>Servlet07</title></head>");
    out.println("<BODY>");
    //Substitute the name of your server or localhost in
    // place of baldwin in the following statement.
    out.println("<FORM METHOD=GET ACTION="
    + "\"http://localhost:8080/myApp/servlet/Servlet077\">");
    out.println("Enter a name and press the button<P>");
    out.println("Name: <INPUT TYPE=TEXT NAME="
    + "\"firstName\"><P>");
    out.println("<INPUT TYPE=submit VALUE="
    + "\"Submit Name\">");
    out.println("<BR><BR>Your list of names is:<BR>");
    if(name == null){
    out.println("Empty<BR>");
    }//end if
    if(items != null){
    for(int i = 0; i < items.length; i++){
    //Display names previously saved in hidden fields
    out.println(items[i] + "<BR>");
    //Save the names in hidden fields on form currently
    // under construction.
    out.println("<INPUT TYPE = hidden NAME=item "
    + "VALUE=" + items[i] + ">");
    }//end for loop
    }//end if
    if(name != null){
    //Display name submitted with current GET request
    out.println(name + "<BR>");
    //Save name submitted with current GET request in a
    // hidden field on the form currently under
    // construction
    out.println("<INPUT TYPE = hidden NAME=item "
    + "VALUE=" + name + ">");
    }//end if
    out.println("</body></html>");
    }//end doGet()
    }//end class Servlet07

    1. Change <form name=xxx action="your_servlet" mathod="Get"> to
    <form name=xxx action="your_servlet" mathod="POST">
    2. Add the following lines of code to your servlet.
    public void doPost(HttpServletRequest req, HttpServletResponse res)
            throws ServletException, IOException {
            doGet(req,res);
            return;
    }Sudha

  • Input type="hidden"  value="....a chain of rubbish letter......"!!

    I use the browser view source function to see the html generated by jsf, and always see something like the following:
    <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="8EgC7hvJoXWgMHaUZxk5rx66APlnNueyP32ajDxbvc/i5akMf2jX5ZGyBjrnsmcbFDLXCaS8cHN169OeG5kDXxvWNcBMTAigJiokZI5Ne66G0/CILkEquml3xSn+jI4+HDkEeDEBtmlPDjjFJyOcOmZ+87klHuSTgAe5P6mMDOQOqrH0Pj9yl+
    ............++nBOnItypO1I+XXANTsWVuCGcV2sghVuKD42Kt/UFL7c6gh4S7KuRSQTuzsQzskJZBO7OxDOyQl0Yq1NF68G0U6T4uIj27tlXpOehNZq4LNOhvQdQH7D6ZKdmAKbVesQLrzhzo9mnY9MN0zJj1r9NhEWfhlFpRxIxYKVda+2pPzvUD9+wbS2NpmjNu5opnJ++XI9z5KpWbdblb9JKIaP6Zzxdsh2E41VBicsyuBzaOTZozbuaKZyfvJAmuJTdCe+/H9z8iOGr8SQHtmk18OUgs7l4BGSVeW3JGgo6F2EHIjEMwkhmgQIkRwDYBkboU2tAin0sPxMybTF65p98Jrn1GsVQxLhbC1F0EKHbwNbKsBvTfuvwqj7Ahik5pmDIMXrIHjmjrrGtj65UvGvkNZ5lbIFl79QTPnWy6OEoxsUJdm0dytee653YD86T4uIj27tlQB3hMxJexgDHCTV10bBgnfB2FWSo74DqQ==" />the value is a chain of meaningless letter, what is it?

    Why are you always so negative in your questions/postings? In every post you're just complaining and throwing around with too much exclamation marks. It's getting annoying. You risk to become placed in the ignore list.
    Anyway, you have configured JSF to use client side state saving. This isn't a default setting.

  • Using a form with two input type="submit" ... buttons...

    Hello All!
    I'm using a form to add and remove parameters for a service definition.
    <form action="serviceinput.jsp" method="post">
                   <table>
                        <tr>
                             <td><b>Level</b></td>
                             <td><b>Fieldname</b></td>
                             <td><b>Stucturename</b></td>
                             <td><b>Type</b></td>
                             <td><b>Format</b></td>
                             <td><b>Optional</b></td>
                             <td><b>Semantics</b></td>
                        </tr>          
         <%
                        for (Iterator iterParameters = parameters.iterator(); iterParameters.hasNext();)
              Parameter parameter = (Parameter) iterParameters.next();
         %>
                        <tr>
              <td><%= parameter.getLevel() %></td>
              <td><%= parameter.getFieldname() %></td>
              <td><%= parameter.getStructurename() %></td>
              <td><%= parameter.getType() %></td>
              <td><%= parameter.getFormat() %></td>
              <td><%= parameter.getOptional() %></td>
              <td><%= parameter.getSemantics() %></td>
                        </tr>     
         <%
         %>
                   </table>
                   <input type="submit" name="<%= parameters.addParameter() %>" value="add"/>
                   <input type="submit" name="<%= parameters.removeParameter() %>" value="remove"/>
              </form>
    The special thing about is, that I'm using two <input type="submit"...> buttons.
    The idea is, that I'd like to add one more row with attributes by clicking the "add" button and removing one row by clicking the "remove" button.
    If I use just one of them, it works fine. If I use both of them, nothing happens at all.
    Isn't it allowed to use two <input type="submit"...> fields?
    Is there an alternative? How can I implement my form the correct way?
    Thanks a lot in advance to all!
    Regards,
    Tomi

    Hi,
    Hai Tomi ,
    As swati already Explained U can try it with buttons,
    But u have to make a Hidden field and set the value of the hidden field
    with the Javascript code after pressing the button , Call a client side function which has an argument as given below
    Validate the Flag field in the JSP file
    <script language=javascript>
    function Validate(s)
    if(s==1)
         document.forms['ServiceInput'].elements["flag"].value="add";
    else
         document.forms['ServiceInput'].elements["flag"].value="Remove";
    document.forms['ServiceInput'].submit();
    alert("hai");
    </script>
    <form name="ServiceInput" action="serviceinput.jsp" method="POst">
    <table>
    <tr>
    <td><b>Level</b></td>
    <td><b>Fieldname</b></td>
    <td><b>Stucturename</b></td>
    <td><b>Type</b></td>
    <td><b>Format</b></td>
    <td><b>Optional</b></td>
    <td><b>Semantics</b></td>
    </tr>
    <%
    for (Iterator iterParameters = parameters.iterator(); iterParameters.hasNext();)
    Parameter parameter = (Parameter) iterParameters.next();
    %>
    <tr>
    <td><%= parameter.getLevel() %></td>
    <td><%= parameter.getFieldname() %></td>
    <td><%= parameter.getStructurename() %></td>
    <td><%= parameter.getType() %></td>
    <td><%= parameter.getFormat() %></td>
    <td><%= parameter.getOptional() %></td>
    <td><%= parameter.getSemantics() %></td>
    </tr>
    <%
    %>
    </table>
    <input type=hidden name=flag value="bb">
    <input type="Button" name="b1" value="add" onclick= "Validate(1)">
    <input type="Button" name="b2" value="remove" onclick= "Validate(2)">
    </form>

  • Building hashtable for INPUT types dynamically

    In my jsp I want to define a method which can build and return a hashtable of all the input types defined inside a form. For example if my form looks like :
    <form name="detail_form" method="post" action="">
    <input type="text" name="asset_name" size="15" value="ABC">
    <input type="text" name="asset_desc" size="45" value="Laptop">
    <input type="hidden" name="employee_id_key" value="58975">
    <input type="hidden" name="asset_id_key" value="15">
    </form>
    then my method will be like :
    <%!
    public Map getCurrentData()
    Map paras=new HashMap();
    paras.put ("asset_name", "ABC");
    paras.put ("asset_desc", "Laptop");
    paras.put ("employee_id_key", "58975");
    paras.put ("asset_id_key", "15");
    return paras;          
    %>
    Now the problem is :
    since the code inside the form can be dynamic (like there can be different number of INPUT types with different names) so I want my method getCurrentData() to be dynamic. That probably means some sort of loop to go through all the INPUT types in the form and storing it in hashtable. But I dont know how to do it in java. Can anybody help me please. Thanks

    I am not exactly sure what you mean by "input types" but you could use the request.getParameterMap() method after the form is submitted. So for example you would have your form like <form ... action="nextpage.jsp"> and on nextpage.jsp you could call request.getParameterMap() to create a map of all the paramaters and their values. Here is what I mean...
    <form name="detail_form" method="post" action="nextpage.jsp">
    <input type="text" name="asset_name" size="15" value="ABC">
    <input type="text" name="asset_desc" size="45" value="Laptop">
    <input type="hidden" name="employee_id_key" value="58975">
    <input type="hidden" name="asset_id_key" value="15">
    </form>
    then on nexpage.jsp you could say
    <% Map myMap = request.getParamaterMap(); %>
    Good Luck
    Zac

  • Php form, input type country

    Is it important to have a country of origin? If so, do I just
    type Greece?
    <input type=hidden value="GREECE"
    name=originating_country>
    Jo

    And who wrote jomail.php? You? Can you show us the code in
    it?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "josie1one" <[email protected]> wrote in message
    news:[email protected]...
    > Sorry, should have looked
    >
    > action="jomail.php"
    >
    > --
    > Jo
    >
    >
    >
    > "Murray *ACE*" <[email protected]>
    wrote in message
    > news:[email protected]...
    >>>>"action"
    >>>
    >>> POST
    >>
    >> No, that's METHOD. What's the "action" attribute's
    value?
    >>
    >> --
    >> Murray --- ICQ 71997575
    >> Adobe Community Expert
    >> (If you *MUST* email me, don't LAUGH when you do
    so!)
    >> ==================
    >>
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >>
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >> ==================
    >>
    >>
    >> "josie1one" <[email protected]> wrote
    in message
    >> news:[email protected]...
    >>> No, no database. Yes, processed to produce a
    summary mesage and emailed
    >>> to the site's owner. No, the owner isn't asking
    for the country of
    >>> origin. The purpose is an enquiry form for
    holiday apartments to let.
    >>>
    >>>>"action"
    >>>
    >>> POST
    >>>
    >>> --
    >>> Jo
    >>>
    >>>
    >>>
    >>> "Murray *ACE*"
    <[email protected]> wrote in message
    >>> news:[email protected]...
    >>>> So the form's data is not captured in a
    database? It's only processed
    >>>> to produce a summary message and emailed to
    the site's owner? Is the
    >>>> owner asking for the Country of origin?
    >>>>
    >>>> What is the value of the "action" attribute
    of the <form> tag?
    >>>>
    >>>> --
    >>>> Murray --- ICQ 71997575
    >>>> Adobe Community Expert
    >>>> (If you *MUST* email me, don't LAUGH when
    you do so!)
    >>>> ==================
    >>>>
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >>>>
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >>>> ==================
    >>>>
    >>>>
    >>>> "josie1one" <[email protected]>
    wrote in message
    >>>> news:[email protected]...
    >>>>> Thanks for the reference, lovely quote
    (o:
    >>>>>
    >>>>> I guess I don't need that information
    but I didn't know if it was
    >>>>> needed.
    >>>>>> how is that information then
    handled?
    >>>>>
    >>>>> php and erm, passed to a mail handler
    which processes a thank you. Is
    >>>>> that the correct answer?
    >>>>>
    >>>>>> By the way, all attribute values
    should be in quotes -
    >>>>>>
    >>>>>> <input type="hidden"....
    >>>>>
    >>>>> Thank you, I will fix that.
    >>>>>
    >>>>> --
    >>>>> Jo
    >>>>>
    >>>>>
    >>>>>
    >>>>> "Murray *ACE*"
    <[email protected]> wrote in message
    >>>>>
    news:[email protected]...
    >>>>>> Why are you feeling it would matter.
    Do *you* need that information?
    >>>>>> If not, then it's like what the
    Cheshire Cat said to Alice....
    >>>>>>
    >>>>>> Alice: [standing at fork in road]
    Which way do I go?
    >>>>>> Cat: What is your destination?
    >>>>>> Alice: It doesn't matter.
    >>>>>> Cat: Then it doesn't matter which
    way you go!
    >>>>>>
    >>>>>> Those fields are there only for the
    support of the processing script,
    >>>>>> and for the way that the information
    is handled. What script are you
    >>>>>> using and how is that information
    then handled?
    >>>>>>
    >>>>>> By the way, all attribute values
    should be in quotes -
    >>>>>>
    >>>>>> <input type="hidden"....
    >>>>>>
    >>>>>> --
    >>>>>> Murray --- ICQ 71997575
    >>>>>> Adobe Community Expert
    >>>>>> (If you *MUST* email me, don't LAUGH
    when you do so!)
    >>>>>> ==================
    >>>>>>
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >>>>>>
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >>>>>> ==================
    >>>>>>
    >>>>>>
    >>>>>> "josie1one"
    <[email protected]> wrote in message
    >>>>>>
    news:[email protected]...
    >>>>>>> Sorry Micha, that wasn't enough
    was it?
    >>>>>>> It's an input form - I can't
    show the link because I have a
    >>>>>>> scripting error, but the
    relevant lines are these:
    >>>>>>>
    >>>>>>> <form name="form1"
    method="post" action="jomail.php">
    >>>>>>> <input type=hidden
    value="General Information Request"
    >>>>>>> name=mailsubject>
    >>>>>>> <input type=hidden
    value="kiwiannes-leros.com"
    >>>>>>> name=originating_site>
    >>>>>>> <input type=hidden value="UK"
    name=originating_country>
    >>>>>>> <input type=hidden
    name="env_report"
    >>>>>>>
    value="REMOTE_HOST,REMOTE_ADDR">
    >>>>>>> <input type=hidden
    value="Information Request" name=title>
    >>>>>>>
    <fieldset><legend><strong>Contact
    Form</strong></legend>
    >>>>>>>
    >>>>>>> line 4 above - the originating
    country is Greece. What do I type
    >>>>>>> please? GR, Greece, GREECE - and
    does it matter?
    >>>>>>>
    >>>>>>> --
    >>>>>>> Jo
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>> "Michael Fesser"
    <[email protected]> wrote in message
    >>>>>>>
    news:[email protected]...
    >>>>>>>> .oO(josie1one)
    >>>>>>>>
    >>>>>>>>>Is it important to have a
    country of origin?
    >>>>>>>>
    >>>>>>>> For what?
    >>>>>>>>
    >>>>>>>>>If so, do I just type
    Greece?
    >>>>>>>>>
    >>>>>>>>><input type=hidden
    value="GREECE" name=originating_country>
    >>>>>>>>
    >>>>>>>> It all depends on the
    server-side script. This hidden field alone
    >>>>>>>> in the
    >>>>>>>> HTML means absolutely
    nothing.
    >>>>>>>>
    >>>>>>>> Micha
    >>>>>>>
    >>>>>>>
    >>>>>>
    >>>>>
    >>>>>
    >>>>
    >>>
    >>>
    >>
    >
    >

  • Struts 1.1 Iterate through input types of image

    Hi everyone,
    I'm using struts 1.1, and specifically the logic:iterate tag. Basically I'm looping through a List of Users. I print out username, userAccessLevel, two image input types (edit or remove). My actionForm associated with the JSP contains the List of Users.
    A User object has an AccessButtons field (among other things),
    an AccessButtons object contains two Buttons objects named edit and remove,
    a Button object has 3 String fields, x, y, and name, and a "pressed()" function
    Essentially I want the Action class to be able to pick up what button was pressed on the ActionForm. Specifically both the user and edit/remove action associated with the button. The code I have so far in the JSP is:
    <logic:iterate id="users" name="accessForm" property="users" indexId="index">
    <bean:define id="ssn" name="users" property="ssn"/>
    <bean:define id="accessButtons" name="users" property="accessButtons"/>
    <bean:write name="users" property="fullname"/>
    <bean:write name="users" property="accessLevel"/>
    <html:image property="accessButtons.edit" src="images/edit.gif" border="0" alt="edit" indexed="true"/>
    <html:image property="accessButtons.remove" src="images/remove.gif" border="0" alt="remove" indexed="true"/>
    </logic:iterate>
    This displays the desired output, but it doesn't help be differentiate the user for which the button was pressed. I left out some of the HTML formatting stuff to keep the code clean.
    Anyone have any ideas? I hope I explained what I wanted clearly and concisely...

    yes, this is a problem, isn't it...
    I would suggess make each user iterration include a separate form tag set and have a hidden field with the user id. but I think this will still have a problem of knowing which of the 2 buttons were pressed. There is a problem here, cuz Netscape 7 sends the button name of the button and button.x and button.y, whereas IE 6 only sends the button.x and button.y, and not the button as is... which presents a problem to figuring out what was clicked. (Plain submit type buttons seem to be fine for submitting). At least, I guess just check for the existance of the button_name.x to see which was pressed, but you still need the user ID in the forms.

  • INPUT TYPE="IMAGE" ??????????

    <INPUT TYPE="IMAGE" SRC="SOMEIMAGE.GIF" NAME="SALES" VALUE = "2000">
    How hard I try this,the above statement never returns a value ..infact it returns SALES.x and
    SALES.y coordinate value but never returns 2000 (which is what i am interested in)....
    Please help me.

    <INPUT TYPE="IMAGE" SRC="SOMEIMAGE.GIF" NAME="SALES"
    VALUE = "2000">
    How hard I try this,the above statement never returns
    a value ..infact it returns SALES.x and
    SALES.y coordinate value but never returns 2000 (which
    is what i am interested in)....
    Please help me.
    Hi,
    The <input> tag of type image will not return the value. It will return the x & y coordinates of the image. the other workaround for this is, have a hidden field, and in the onClick() event of the image, populate the hidden field with the value using javaScript.
    hope this helps u....

  • How do you stop an MBP headphone-in from constantly re-detecting input type?

    I'm a professional music producer - I work for majors.
    I only use "regular" ("studio quality") headphones in my MBP, for reference on-the-move.
    I have had the same issue on two consecutive MBP's now.
    Every time there is the slightest movement or slight strain on the jack - the MBP silences the input (and, I assume tries to detect what type of input there is at the socket). This can happen when adjusting the MBP in ones lap, table... it can happen at every movement of machine or cable.
    The jack doesn't have to visibly move. I have to take out the jack wait a second and re-insert. This doesn't even work every time.
    So: How does one manually set and lock the input type?

    Vogon wrote:
    Indeed it would, thanks.
    I have a number of USB related devices but I don't want to carry extra equipment around or want to use headphones other than those I am used to in the studio... Ones you can wear for extended periods too. Unless you know of studio quality USB headphones?
    Especially when my >$2500  MBP claims to have a usable headphone socket. ;-)
    So, there is no user option to turn off a feature which interupts work like this?
    I don't think that it is a 'feature' my bet is on 'failure' instead.
    I think that the connection between the 3 pole connector on your studio quality headphones (a model would be nice to know) and the 4 pole socket on the Mac is not good. Can you reproduce this with a standard pair of Apple earbuds (a test only) or is it limited to whatever your headphones are?
    I will also suggest a USB interface, they are very small (put it in your pocket, buy 2) the Logitech version is in the picture below.
    If you do choose the 3.5mm to USB option this one (Turtle Beach Amigo II) is the best I have used.
    Requiring no drivers (on a Mac) it sounds at least as good as the internal audio does.

  • Is there an easy way to run an Ajax function from input type=file to test the file name in DB?

    I've had the <input type="file">  ... <cffile ...> thing going for a few years now. 
    There is a database where the uploaded file names are stored once the files are uploaded to the server.  It sees things in terms of problems and stores uploaded file name accordingly with the ProbID prepended onto the file name; e.g., MyPicture.jpg would end up in the designated directory and databawe as P416_MyPicture.jpg.  This allows user to store pictures with the same name in different problems without a conflict.  There has been an issue with certain characters (e.g., spaces, +, #, etc.) causing problems when they are in file names so we have come up with a way using the <cffile ... rename> to replace these chars with _.  This means that MyPic+.jpg would end up being P416_MyPic_.jpg. 
         This is where the problem appears.  If someone were to upload MyPic+.jpg after someone else uploaded MyPic_.jpg in the same problem, then the + file would overwrite the _ file before the system knew they had a problem.  And there is now way to restore the original file without going to the system backup and doing so – which is a whole other story … especially, if the person doesn’t tell anyone.
         The logical solution would be to be able to test the new final file name (the name after making the substitutions mentioned above) against the existing files in the database before you went from the page where the <input type=file> control to the associated _action.cfm page where the <cffile> object is located.  Given that this seems to be the province of Ajax, this would seem like a natural use of the really interesting technology.  I have can determine the file name from the onChange action on the <input type=File> so that this would be the place for Ajax to come to the rescue by looking up the final file name and then letting the user know whether the resultant name is a unique within the database or not.  If so, I'll just enable the Add button which sets right next to the <input > control and let them upload it.  If not, I'll put up an error message telling them that this file already exists in the system.
         This would be the perfect solution.  It would let me do some Ajax stuff like I've wanted to do for the past year, but never have had the time to do because this is the project that won't go away.  This is, in fact, the last thing of any consequence that remains to do on this 2-1/2 year nightmare – be careful what you wish for.  If I can get this done this week, then maybe I can finally take a weekend off … maybe it will finally come to an end.
         Which finally leads to my question:  I'm looking for some tips on how to get this thing going since I can barely spell Ajax.  I've got a book and looked at some stuff online about CF and Ajax, but a good example or two or three would be worth a day's worth of poking around on the web and in my books.
         Thanks in advance for any suggestions, ideas, help, whatever.
    Len

    Adam,
         Thank you for your suggestion, but, after spending the night working with Ben Forta's CF8, vol 2, Chap 34, working with <cfajaxproxy>, I was able to do exactly what I wanted and it appears, after some testing, to work exactly as I had envisoned it should. 
         I am now calling a JavaScript function (testFileName) from the onChage event on the <input type="file"> or Browse button, which calls my proxy.cfc that contains the server side of the equation.  This funciton testFileName (I've run out of cleaver function/file names).  The query contained therein hits the database to see if the passed in parameters can pull up an existing file.  If they do, the particulars (file name, data attahced, etc.) are returned to the JavaScipt procedure that puts up the error notice.  The user can then chose to either overwrite the file or quit.  Quiting leaves the your on the Attachment PopUp where he/she started with nothing being uploaded. 
         Thanks again for your suggestion.  I appreciate your taking the time to do so.
    Len

  • Passing request of file input type to a jsp

    Hi i m using this script for file uploading the form is.... <html > <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <form action="uploadscript.jsp" name="filesForm" enctype="multipart/form-data" method="post">
    Please specify a file, or a set of files:
    <input type="file" name="userfile_parent" value="userfile_parent" >
    <input type="submit" value="submit" value="Send">
    </form> </body> </html> And i am tring to get the url on uploadscript.jsp by using String parentPath=request.getParameter("userfile_parent"); but i foud that its value is NULL it is not working what should i do to get the userfile_parent on uploadscript.jsp help me!!! Message was edited by: UDAY Message was edited by: UDAY
    avajain      
    Posts: 135
    From: Noida , India
    Registered: 5/10/06
    Read      Re: Passing response but getting NULL
    Posted: Sep 20, 2006 2:43 AM in response to: UDAY in response to: UDAY      
         Click to reply to this thread      Reply
    Use method="GET" in place of method="post" .
    Thanks
    UDAY      
    Posts: 26
    From: JAIPUR
    Registered: 8/14/06
    Read      Re: Passing response but getting NULL
    Posted: Sep 20, 2006 3:18 AM in response to: avajain in response to: avajain      
    Click to edit this message...           Click to reply to this thread      Reply
    now it is giving this error message by e.getMessage()
    [br]the request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is null
    the uploadscript is this....
    http://www.one.esmartstudent.com
    can u please help me.

    Here is sample code which we have used in one of our projects with org.apache.commons.fileupload.*.
    You can find String fullName = (String) formValues.get("FULLNAMES"); at the end that gives name of file.
    <%@ page import="java.util.*"%>
    <%@ page import="java.util.List"%>
    <%@ page import="java.util.Iterator"%>
    <%@ page import="java.io.File"%>
    <%@ page import="java.io.*"%>
    <%@ page import="org.apache.commons.fileupload.*"%>
    <%@ page import="org.apache.commons.fileupload.disk.*"%>
    <%@ page import="org.apache.commons.fileupload.servlet.*"%>
    <%!     
         //method to return file extension
         String getFileExt(String xPath){ 
                   //Find extension
                   int dotindex = 0;     //extension character position
                   dotindex = xPath.lastIndexOf('.');
                   if (dotindex == -1){     // no extension      
                        return "";
                   int slashindex = 0;     //seperator character position
                   slashindex = Math.max(xPath.lastIndexOf('/'),xPath.lastIndexOf('\\'));
                   if (slashindex == -1){     // no seperator characters in string 
                        return xPath.substring(dotindex);
                   if (dotindex < slashindex){     //check last "." character is not before last seperator 
                        return "";
                   return xPath.substring(dotindex);
    %>
    <%           
    Map formValues = new HashMap();
    String fileName = "";
    boolean uploaded = false;
         // Check that we have a file upload request
         boolean isMultipart = FileUpload.isMultipartContent(request);
         //Create variables for path, filename and extension
         String newFilePath = CoeResourceBundle.getEmailProperties("FILE_UPLOAD_PATH");//application.getRealPath("/")+"temp";
         String newFileName ="";
         String FileExt = "";      
         //System.out.println(" newFilePath"+newFilePath+"/");
         //out.println(" newFilePath"+newFilePath+"<br>");
         // Create a factory for disk-based file items
         FileItemFactory factory = new DiskFileItemFactory();
         // Create a new file upload handler
         ServletFileUpload upload = new ServletFileUpload(factory);
         // Parse the request
         List /* FileItem */ items = upload.parseRequest(request);
         // System.out.println(" newFilePath"+newFilePath+"/");
         // Process the uploaded items
         Iterator iter = items.iterator();
         //Form fields
         while (iter.hasNext()) { 
         //System.out.println("in iterator");
              FileItem item = (FileItem) iter.next();
              if (item.isFormField()) { 
                   String name = item.getFieldName();
                   String value = item.getString();
                   if (name.equals("newFileName")) { 
                        newFileName = value;
                   //System.out.println("LOADING");
                   formValues.put(name,value);
              else { 
              //System.out.println("in iterator----");
                   String fieldName = item.getFieldName();
                   fileName = item.getName();
                   int index = fileName.lastIndexOf("\\");
              if(index != -1)
                        fileName = fileName.substring(index + 1);
              else
                        fileName = fileName;
                   FileExt = getFileExt(fileName);
                   String contentType = item.getContentType();
                   boolean isInMemory = item.isInMemory();
                   long sizeInBytes = item.getSize();
                   if (fileName.equals("") || sizeInBytes==0){ 
                        out.println("Not a valid file.<br>No upload attempted.<br><br>");
                   } else { 
                   // out.println("ACTUAL fileName= " newFilePath"\\"+fileName+ "<br>");
                        //File uploadedFile = new File(newFilePath+"\\", newFileName+FileExt);
                        File uploadedFile = new File(newFilePath+"/",fileName);
                        File oldFile = new File(CoeResourceBundle.getEmailProperties("FILE_UPLOAD_PATH")+"/"+fileName);
                        File oldFileApproved = new File(CoeResourceBundle.getEmailProperties("APPROVED_FILE_LOCATION")+"/"+fileName);
                        try{ 
                             if (!oldFile.exists()&&!oldFileApproved.exists())
                                  item.write(uploadedFile);
                                  uploaded = true;
                             //out.println(fileName+" was successfully uploaded as "+ newFileName+FileExt +".<br><br>");
                        catch (java.lang.Exception e) { 
                             out.println("Errors prevented the file upload.<br>"+fileName+ " was not uploaded.<br><br>");
         String userid = (String) formValues.get("USERID");
         String fullName = (String) formValues.get("FULLNAMES");
         String email = (String) formValues.get("EMAILID");
         String empno = (String) formValues.get("EMPNO");
         String docType = (String) formValues.get("DOCTYPE");
         String desc = (String) formValues.get("MYTEXT");
         String title = (String) formValues.get("TITLEBOX");
         String module = (String) formValues.get("MODULE");
         String techfunctype = (String) formValues.get("TECHFUNCTYPE");
    %>

  • Uploading a file using input type=file

    Hi,
    I'm not sure if I'm in the right place or not. If not can you please let me know where to find and answer for my question.
    I'm trying to upload a file in oracle self-service (online page) and I found that the input type=file will let me select the file so I place the input type inside my htp.formopen command.
    I used the following when opening the formopen
    htp.formOpen(my_link, 'post',null, 'multipart/form-data');
    then I created the <input type="file"> tag
    But when I send the link to my second page to see if the input type works I get the page not found error.
    I'm thinking that maybe is because my 2nd page doesnt have a parameter that will hold the file but right now I'm not sure how to declare the file variables.
    Do you have any idea what could be wrong?
    Thanks

    What does your form do when you submit it? Handling file uploads is a bit of a convoluted process. I'd recommend starting here for some guidance:
    http://docs.oracle.com/cd/B14099_19/web.1012/b14010/concept.htm#i1005985

  • Hi everyone I have a macbook pro mid 2010 17'' 2.66 i7 looking to put a new hard drive in it something like a 250 gb  ,  orig drive 500 gb 5400 toshiba but i don;t really need that much space so i would like some input, type,speed,brand,compatibly,noise

    I have a macbook pro mid 2010 17'' 2.66 i7 looking to put a new hard drive in it something like a 250 gb  ,  orig drive 500 gb 5400 toshiba but i don;t really need that much space so i would like some input, type,speed,brand,compatibly,noise Thank You!!

    There's no reason to install a smaller hard drive. In some cases, it may decrease performance.
    Your MacBook Pro comes with a 5400 rpm hard drive, so what you can do is to install a smaller, 7200 rpm hard drive, so you will get a better performance. Any 2'5" SATA hard drive will work, but you can have a look at OWC for hard drives > http://eshop.macsales.com/shop/hard-drives/2.5-Notebook/
    HGST and Seagate hard drives have a good reputation, so you can purchase one of them

  • Input type="image" only works in Safari, but not IE or Firefox?

    Having accidentally discovered a form on a site I am working on was only working in Safari, I've just spent about five hours retracing my steps, before eventually discovering that the code that was making the form fail was my submit code.
    The page I was looking at had quite a bit of validation, CAPTCHA code and some jQuery to style some drop downs, so I figured something there was the issue.
    But it turned out just to be the submit button.
    I've just tried it on my contact page, and its failing in Firefox (Mac) too (and so I assume IE as well.)
    Should this work, or is using input type="image" on a form submit button a big no no?
    This code works:
    <input type="submit" name="KT_Insert1" id="KT_Insert1" value="Post your query" />
    But this code does not work (except, it seems, in Safari):
    <input name="KT_Insert1" type="image" id="KT_Insert1" onmouseover="MM_swapImage('KT_Insert1','','../images/buttons/post_enquiry2.jpg',1)" onmouseout="MM_swapImgRestore()" value="Post your query" src="../images/buttons/post_enquiry1.jpg" border="0" />
    Or am I missing something here?

    Thanks for that - might have realised this a lot earlier if it didn't work in Safari!
    I assume I just need some CSS like:
    .formbutton
      background-image: image1.jpg;
    .formbutton :hover
      background-image: image2.jpg;
    And:
    <input type="submit" name="KT_Insert1" id="Send" value="Send message" class="formbutton" />

Maybe you are looking for