Prefill a HTML Imput form

Good morning,
I'm Barbara. I'm developing a portlet to send an email. It's a PDK java based portlet (Oracle standard). I have to prefill the HTML form.
In particular I would like:
-1) to insert a String value in the field VALUE of an input form. Of course I don't want just something like
VALUE = "[email protected]"but I'd like to pass the value of the string using the variable name "prova".
<%
String prova ="[email protected]";
%>
<TR>
<TD ALIGN=RIGHT width="124"><b>From</b></TD>
<TD ALIGN=LEFT width="298">
<INPUT TYPE=TEXT SIZE=60 MAXLENGTH=60 NAME="p_from" VALUE= >
</TD>
</TR>2) to insert a String value in a Text Area:
<%
String msg = "Test 1"
%>
<b>Message</b><br>
<TEXTAREA NAME="p_message" ROWS=10 COLS=66 SIZE=2000 WRAP=HARD>
HERE I WOULD LIKE TO INSERT THE STRING "msg"
</TEXTAREA>Could you give me some helps?
Thanks a lot
Regards
Barbara
Edited by: Barbie_83 on Oct 29, 2008 2:33 AM

<%
String prova ="[email protected]";
%>
<TR>
<TD ALIGN=RIGHT width="124"><b>From</b></TD>
<TD ALIGN=LEFT width="298">
<INPUT TYPE=TEXT SIZE=60 MAXLENGTH=60 NAME="p_from" VALUE=<%= prova %> >
</TD>
</TR>
String msg = "Test 1"
%>
<b>Message</b><br>
<TEXTAREA NAME="p_message" ROWS=10 COLS=66 SIZE=2000 WRAP=HARD>
<%= msg %>
</TEXTAREA>instead of <%=variable %> you can also use <% out.print(variable) %>...

Similar Messages

  • Calling a JSP Report From HTML parameter form

    Hi,
    I m trying to run a JSP Report from a HTML parameter Form. The JSP reports requires a parameter named userid in the URL with a valid value for database connection.
    eg. URL "http://win2kdb.oracle9iis.com:7778/repdemo/examples/Tools/fm_crdinf.jsp?userid=sysapps/system@trt1". We have created a variable on the server named "parmformjsp" with a value "sysapps/system@trt1". Now i use this variable in the URL as follows, eg. "http://win2kdb.oracle9iis.com:7778/repdemo/examples/Tools/fm_crdinf.jsp?parmformjsp".
    When i use this URL to call another JSP report from a JSP report it works fine, but the same does not work when calling a JSP report from a HTML form.
    the code for HTML parameter form calling a report is as follows,
    <html>
    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Parameter Form</title>
    </head>
    <body>
    <p>Parameter Form</p>
    <form name="form1" method="GET"
    action="http://win2kdb.oracle9iis.com:7778/repdemo/examples/Tools/fm_custrns.jsp?parmformjsp">
    <p>From Date<input type="text" name="p_fmdate" size="20"></p>
    <p>To Date<input type="text" name="p_todate" size="20"></p>
    <p> </p>
    <p><input type="submit" ><input type="reset" value="Reset" name="B2"></p>
    </form>
    <p> </p>
    </body>
    </html>
    If i create an input parameter named "userid" with a valid database connection value, remove the ?parmformjsp part from the action URL then it works fine. How can i call the JSP report using the parmformjsp variable name instead of using the "userid" clause in the URL.Can anyone suggest any workaround....
    Thanks & Best Regards,
    Unmesh

    do it like this...
    DECLARE
    pl_id ParamList := Get_Parameter_List('tmpdata');
    BEGIN
    IF NOT Id_Null(pl_id) THEN
      Destroy_Parameter_List( pl_id );
    END IF;
    pl_id := Create_Parameter_List('tmpdata');
    Add_Parameter(pl_id, 'ROUTE_CARD_CONTROL', TEXT_PARAMETER, :ROUTE_CARD.ROUTE_CARD_CONTROL);
    Add_Parameter(pl_id, 'PARAMFORM', TEXT_PARAMETER, 'NO');
    Run_Product(REPORTS, 'D:\STL_FINAL\CHPREPORTS_FINAL\ROUTE_CARD.REP', SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);
    END; what exactly happens when you call the report. if its showing the blank page... may be you are not passing the right parameter name. cross-check that your parameter name in the report is 'ROUTE_CARD_CONTROL'.

  • The html-el:checkbox No Longer Works If Preceded by html-el:form

    My <html-el:checkbox worked fine. But if the <html-el:form ....> ... </html-el:form> come before the <html-el:checkbox ... >, I got the runtime JSP error: "cannot find bean: "org.apache.struts.taglib.html.BEAN" in any scope".
    The complaint points specifically to the <html-el:checkbox property="selectedUsers[${idx.index}].selected" />. The getter method for selectedUsers[0].selected can no longer be recognized.
    I need help because I really do not understand why it happens this way.
    <%@ page import="......common.pojo.user.User" %>
    <!-- Create a variable in scope called userRows from the Users object -->
    <c:set var="userRows" value="${requestScope.Users}" />
    <c:choose>
                                    <html-el:form action="/admin/findUsers.do">
                                               // many textfields and a submit button
                                    </html-el:form>
         <c:when test="${not empty userRows}">
              <!-- create a "user" object for each element in the userRows -->               
              <c:forEach var="user" items="${userRows}" varStatus="idx">
                                      <tr>                        
                          <td align="center">
                                                               <html-el:checkbox property="selectedUsers[${idx.index}].selected" />
                                                              <html-el:hidden property="selectedUsers[${idx.index}].id" value="${user.id}"/>
                                           </td>
             </tr>
                 </c:forEach>
                        <tr>
                             <td colspan="6" align="left">
                                      <html-el:link action="/admin/selectUsers.do">Edit Selected Users</html-el:link>
                             </td>
                           </tr>
                   </table>
              </c:when>
         </c:choose>
    ......

    The checkbox does "not" belong to the form that invokes the "findUsers.do" action. I put some search criteria in that form to search for users in the database.
    The checkbox "is" supposed to be outside the form and gets submitted to another action called "selectUsers.do".
    Question: How do I use the name attribute as well as the property attribute for the <html-el:checkbox property="selectedUsers[${idx.index}].selected" />?
    The checkbox is associated with SelectUsersForm.java:
    public class SelectUsersForm extends ActionForm
         private Map selectedUserFieldMap = new HashMap();
         private String[] selectedUsers = new String[0];
         private String[] selectedUserIDs;
        public SelectedUserField getSelectedUsers( int index )
           SelectedUserField selectedUserField = ( SelectedUserField )selectedUserFieldMap.get( new Integer( index ) );
           if ( selectedUserField == null )
             selectedUserField = new SelectedUserField();
             selectedUserFieldMap.put( new Integer( index ), selectedUserField );
           return selectedUserField;
        // Convenience method to get a list of selected user IDs.
        public String[] getSelectedUserIDs()
           List theUserIDList = new ArrayList();
           Iterator i = selectedUserFieldMap.values().iterator();
           while( i.hasNext() )
              SelectedUserField selectedUserField = ( SelectedUserField ) i.next();
              if ( selectedUserField.isSelected() )
                 theUserIDList.add( selectedUserField.getId() );
           return ( String[] )theUserIDList.toArray( new String[theUserIDList.size()] );
       public void reset( ActionMapping mapping, HttpServletRequest request)
           selectedUsers = new String[0];
           selectedUserIDs = new String[0];
    }and SelectedUserField.java is like:
    public class SelectedUserField
        private boolean selected = false;
        private Long id;
        public Long getId()
           return id;
        public void setId( Long newValue )
           id = newValue;
        public boolean isSelected()
           return selected;
        public void setSelected( boolean newValue )
           selected = newValue;
    }

  • Convert HTML Web form to a PDF

    I have an HTML web form which will be filled out by a user online. Is it possible for me to convert this form and the data which has been filled in by the user to a pdf and save it to a file after the user selects submit?
    Thanks,
    Patti.

    Hi,
    Check out JasperReports / iReport. ( SourceForge )
    Nick

  • In my Mac Mail Version 4.5, I am not received email pdf attachement. It is shown in some html like form in message content. Please help

    In my Mac Mail Version 4.5, I am not received email pdf attachement. It is shown in some html like form in message content. Please help

    Erdygirl please be aware you are posting to a public forum.  I have removed your personal information from your previous post.
    Please check your account at http://www.adobe.com/ to locate your serial number.  You can find more information on how to locate your serial number at Find your serial number quickly - http://helpx.adobe.com/x-productkb/global/find-serial-number.html.

  • About html parameter form

    Hi Guys,
    if i put the code as below in the before form value
    <html>
    <body bgcolor="#29716F">
    <form method=post action="http://localhost/reports/rwservlet?">
    <input name="hidden_run_parameters"
    type=hidden value="report=account_statement.rdf&userid=scott/tiger@ora10&desformat=pdf&destype=Cache">
    <center>
    <p><table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><input type=submit></td>
    <td width=15>
    <td><input type=reset></td>
    </tr>
    </table>
    <p><hr><p>
    </form>
    </body>
    </html>
    the html parameter form works file ,it can take the user parameters into report output.
    but if i put this code in after form value
    it doesn't work, can not pass user parameters into output.
    Actually, i just want to move submit and reset buttons down, let them are displayed after customized parameter form.
    anybody has idea about this? Thanks in advance.
    Appcat
    Message was edited by:
    user577805

    Hello,
    To display the buttons "Submit" and "Reset" at the bottom of the Parameter Form, just put the lines
    <input type=submit>
    <input type=reset>
    just before the tag </form>
    Example of "After Form Value" :
    <table><tr>
    <td><input type=submit></td>
    <td width=15>
    <td><input type=reset></td>
    </tr></table>
    </center>
    </body>
    </form>
    </html>
    Regards

  • I opened Adobe Acrobate XI Standard to create a form.  I then selected From Template, which took me to Adobe FormsCentral Online.  However, I think the form is an HTML web form.  All I wanted was a regular PDF form that I could email my co-workers for an

    I opened Adobe Acrobate XI Standard to create a form.  I then selected From Template, which took me to Adobe FormsCentral Online.  However, I think the form is an HTML web form.  All I wanted was a regular PDF form that I could email my co-workers for an internal project we're colletively working on.  Now I see that FormsCentral is going away and I can't get my doc to save as a PDF without an upgrade?  Help

    You should be able to log into the online Formscentral Acrobat XI air app and see your doc there. From there you would need to save it out as a PDF without a submit button to have it continue to work past July. If you don't see your online form(s) please let me know the adobeID you use to log into the service as well as the form name that is missing and I will look into it for you.
    Andrew

  • Embed/build a big "html/flash" form in a flash doc

    How I embed/build a big "html/flash" form in a flash doc,
    that needs scrolls ? What to use ? Give me and an example
    design/code ?

    Nickels55 wrote:
    > Not too difficult.
    > First create your button or movieclip with the big
    arrow.
    > Give your flv playback component an instance name like
    vid.
    > Create a new layer above the video layer. Drag your
    button/movieclip to the
    > stage.
    > Give the button/movieclip an instance name like
    vidcontrol.
    >
    > Put this actionscript on the frame (not attached to the
    button or component):
    >
    > vidcontrol.onPress = function(){
    > vidcontrol._visible= false; //makes arrow
    button/movieclip invisible
    > vid.play(); //makes video play
    > }
    >
    > Tested code and concept and it works perfect.
    Brilliant, works like a charm. Thanks very much, Nickels55!
    Is there a way I can add something like your
    "vidcontrol._visible=
    false;" to the "Mojaveexternalall.swf" skin as well? Right
    now if I
    click on the big arrow, everything works fine, but if I click
    on the
    Mojaveexternalall's small Play arrow instead, that new button
    layer
    doesn't disappear.

  • Creating a Flash version of a HTML/CGI Form

    Hello: I have a Flash webpage where I visually designed a Form. I have not been able to find how to give My form the generic capabilities of an HTML/CGI Submit-able Form. For clarity, I included (below) my Form code for my HTML Webpage. If someone has a block of ActionScript 3 code that has the mention abilities, could you please post a reply ? ... or, is there a more common method of importing my existing HTML/CGI form into my Flash website ? Thank-You. MLR - - -
    <form name="formmail"  action="/cgi-bin/formmail/formmail.cgi" method="post">
    <input type=hidden name="recipient" value="[email protected]">
    <input type="hidden" name="redirect" value="../../thankYou.html" />
    <p />
    <b>Name:</b><input  type="text" name="name"  size="30" maxlength="30" class="fieldStyle1" /><br />
    <b>Email:</b><input  type="text" name="email"  size="30" maxlength="30" class="fieldStyle1" />
    <p />
    <b>Comments:</b><br />
    <textarea name="comments"  rows="10"  cols="50" class="fieldStyle1"></textarea>
    <p />
    <input type="submit"  value="Send" />
    <input type="reset"  value="Clear" />
    </form>

    Just follow this tutorial and you have it
    http://www.thetechlabs.com/interfaces/how-to-create-a-simple-flashphp-mail-contact-form-wi th-as3-and-mysql/

  • Can I upload a php file to my host with an embedded html contact form in Muse for it to work?

    Can I upload a php file to my host with an embedded html contact form in Muse for it to work?

    That would require to know your hosting provider and his requirements. And therein also lies the answer: You cannot blindly design a form in Muse and just hope it will work, you have to know this stuff beforehand and design "to spec".
    Mylenium

  • JSP HTML parameter form to call report - Dependent  drop down list

    I have a report parameter form developed using HTML & JSP to call oracle reports6i.
    First parameter "STATES", Second Parameter "CITY"
    I have a master-detail relation betwen STATE & CITY table.
    I want the parameter form drop down lists dependant. ie if the user chang STATE value in the first drop down, the second drop down list CITY shoud
    change automatically.
    Please help
    Thanks
    Vimal

    Vimal,
    This is not functionality that's available in the Reports generated parameter form. In order to do this you'll need to build the parameter form yourself as a true HTML form and code the javascript to link the fields.
    Hope this helps,
    Danny

  • HTML multipart form is not working in jsp page

    Hi
    i have jsp page, has a HTML from with file upload field , when i click the send button , nothing happened as if the button did not submit the form. ie the message at line 12 is not printed out.
    can any one help please.
    <%@ page errorPage="..\error\error.jsp" %>
    <%@ page pageEncoding="windows-1256" %>
    <%@ page language="java" import="javazoom.upload.*,java.util.*,java.sql.ResultSet" %>
    <jsp:useBean id="upBean" scope="page" class="javazoom.upload.UploadBean" >
      <jsp:setProperty name="upBean" property="folderstore" value="<%=request.getRealPath("thuraya//uploads")%>"  />
    </jsp:useBean>
    <jsp:useBean id="dbc" class="mypackage.DBConnection" scope="session" />
    <!-- add news-->
    <%
    if(request.getParameter("addBTN") != null){
            out.println("addbtn");
            //do upload file + insert in database
             if (MultipartFormDataRequest.isMultipartFormData(request))
             // Uses MultipartFormDataRequest to parse the HTTP request.
             MultipartFormDataRequest mrequest = new MultipartFormDataRequest(request);
             String todo = null;
             if (mrequest != null) todo = mrequest.getParameter("todo");
                 if ( (todo != null) && (todo.equalsIgnoreCase("upload")) )
                    Hashtable files = mrequest.getFiles();
                    if ( (files != null) && (!files.isEmpty()) )
                        UploadFile file = (UploadFile) files.get("filename");
                        if (file != null)
                                            out.println("<li>Form field : uploadfile"+"<BR> Uploaded file : "+file.getFileName()+" ("+file.getFileSize()+" bytes)"+"<BR> Content Type : "+file.getContentType());
                                            String fileName=file.getFileName();
                                            String ran=System.currentTimeMillis()+"";
                                            String ext=fileName.substring(   ( fileName.length()-4),fileName.length() );
                                            file.setFileName(ran+ext);
                        // Uses the bean now to store specified by jsp:setProperty at the top.
                        upBean.store(mrequest, "filename");
                                            String title=request.getParameter("title");
                                            String content=request.getParameter("elm1");
                                            int x=dbc.addNews(title,content,file.getFileName(),2,1);
                                            if(x==1)
                                                     out.print("New Vedio has been addedd Successfully");
                                                      response.setHeader("Refresh","1;URL=uploadVedio.jsp");
                                                     else{
                                                      out.print("An Error Occured while adding new Vedio");
                                                      response.setHeader("Refresh","1;URL=uploadVedio.jsp");
                    else
                      out.println("<li>No uploaded files");
             else out.println("<BR> todo="+todo);
    %>
    <!-- end of add news-->
    <form action="" method="post" enctype="multipart/form-data" name="upform" >
      <table width="99%" border="0" align="center" cellpadding="1" cellspacing="1">
        <tr>
          <td colspan="2" align="right" bgcolor="#EAEAEA" class="borderdTable"><p>'6'A) .(1 ,/J/</p></td>
        </tr>
        <tr>
          <td width="87%" align="right"><label>
            <input name="title" type="text" class="rightText" id="title">
          </label></td>
          <td width="13%" align="right">9FH'F 'D.(1</td>
        </tr>
        <tr>
          <td align="right"><textarea name="elm1" cols="50" rows="10" id="elm1" style="direction:rtl" >
              </textarea></td>
          <td align="right">*A'5JD 'D.(1</td>
        </tr>
        <tr>
          <td align="right"><label>
            <input type="file" name="filename" id="filename">
          </label></td>
          <td align="right">5H1)</td>
        </tr>
        <tr>
          <td align="right"><label>
            <input onClick="submit()" name="addBTN" type="button" class="btn" id="addBTN" value="  '6'A) .(1 ">
          </label></td>
          <td align="right"> </td>
        </tr>
      </table>
    </form>
    <!-- TinyMCE -->
    <script type="text/javascript" src="jscripts/tiny_mce/tiny_mce.js"></script>
    <script type="text/javascript">
            tinyMCE.init({
                    mode : "textareas",
                    theme : "simple",
                    directionality : "rtl"
    </script>
    <!--end of TinyMCE -->

    the problem is not because of java code insdie jsp page
    I have removed all things but the form and it is still not working
    here is the modified code:
    <!-- add news-->
    <%
    if(request.getParameter("addBTN") != null){
            out.print("addBTN");
    %>
    <!-- end of add news-->
    <form action="" method="post" enctype="multipart/form-data" name="upform" >
      <table width="99%" border="0" align="center" cellpadding="1" cellspacing="1">
        <tr>
          <td colspan="2" align="right" bgcolor="#EAEAEA" class="borderdTable"><p>'6'A) .(1 ,/J/</p></td>
        </tr>
        <tr>
          <td width="87%" align="right"><label>
            <input name="title" type="text" class="rightText" id="title">
          </label></td>
          <td width="13%" align="right">9FH'F 'D.(1</td>
        </tr>
        <tr>
          <td align="right"><textarea name="elm1" cols="50" rows="10" id="elm1" style="direction:rtl" >
              </textarea></td>
          <td align="right">*A'5JD 'D.(1</td>
        </tr>
        <tr>
          <td align="right"><label>
            <input type="file" name="filename" id="filename">
          </label></td>
          <td align="right">5H1)</td>
        </tr>
        <tr>
          <td align="right"><label>
            <input name="addBTN" type="submit" class="btn" id="addBTN" value="  '6'A) .(1 ">
          </label></td>
          <td align="right"> </td>
        </tr>
      </table>
    </form>
    <!-- TinyMCE -->
    <script type="text/javascript" src="jscripts/tiny_mce/tiny_mce.js"></script>
    <script type="text/javascript">
            tinyMCE.init({
                    mode : "textareas",
                    theme : "simple",
                    directionality : "rtl"
    </script>
    <!--end of TinyMCE -->

  • How to get the file path from HTML input form in Firefox 3...

    In IE7 (and probably all famous browsers, including old Firefox 2), if we submit a file like 'C:\folder1\folder2\folder3\filename' it works properly and gives the full path to the file and the filename.
    In Firefox 3, it returns only 'filename', because of their new 'security feature' to truncate the path, as explained in Firefox bug tracking system (https://bugzilla.mozilla.org/show_bug.cgi?id=143220)
    I have no clue how to overcome this 'new feature' because it causes all upload forms in my webapp to stop working on Firefox 3.
    Can anyone help to find a single solution to get the file path both on Firefox 3 and IE7?
    Thanks in advance....

    As you're posting this in the JSF forum and looking at your [previous topic|http://forums.sun.com/thread.jspa?threadID=5342365], I assume that you're using Tomahawk's t:inputFileUpload. In this case, just use UploadedFile#getInputStream(). You may find this article useful: [http://balusc.blogspot.com/2008/02/uploading-files-with-jsf.html].
    By the way, are you lazy or just dumb? You wasted one week to this! I've posted the aforementioned article one week ago. How did you stuck?

  • Extremely URGENT! How to pass a parameter from html to form?

    Hi Guys,
    I want to be able to pass a parameter to a Pre-Query trigger (from a html page to an Oracle form.) Right now, I hard coded the Pre-Query trigger
    (i.e. set_block_property('datablock_name', default_where, 'tableName.fieldName = '||:datablock.field)
    I want to be able to assign a value to the above datablock.field from an URL (i.e. something like http://localhost/dev60cgi/ifcgi60.exe?form=MODULE1.fmx&userid=&otherparams=fieldx=parameterSample
    Does anyone know how to set that up within Oracle Forms. Thanks in advance.

    Hello. your you can create one it paginates similar to this...
    <HEAD></HEAD>
    <BODY >
    <!-- Forms applet definition (start) -->
    <OBJECT classid="clsid:86ecb6a0-400a-11d5-b638-00c04faedb18" codebase="/jinitiator/jinit.exe#Version=1,1,8,11" WIDTH="950" HEIGHT="560" HSPACE="0" VSPACE="0">
    <PARAM NAME="TYPE" VALUE="application/x-jinit-applet;version=1.1.8.11">
    <PARAM NAME="CODEBASE" VALUE="/forms60java/">
    <PARAM NAME="CODE" VALUE="oracle.forms.engine.Main" >
    <PARAM NAME="ARCHIVE" VALUE="f60all_jinit.jar, ComponentesEsigfa.jar" >
    <PARAM NAME="serverPort" VALUE="9000">
    <PARAM NAME="serverHost" VALUE="MyServer">
    <PARAM NAME="serverURL" VALUE="/servlet/oracle.forms.servlet.ListenerServlet?ifcfs=/servlet/f60servlet?config=servlet&form=fca_menu.fmx&otherparams=ejercicio=<%=request.getParameter("ejercicio")%>&useSDI=yes&lookAndFeel=generic&colorSchema=teal">
    <PARAM NAME="connectMode" VALUE="HTTP">
    <PARAM NAME="serverArgs"
    VALUE="module=fca_menu.fmx userid=<%= request.getParameter("login")+"/"+request.getParameter("pwd")+ "@" +request.getParameter("base")%> ejercicio=<%=request.getParameter("ejercicio")%>">
    <PARAM NAME="separateFrame" VALUE="false">
    <PARAM NAME="splashScreen" VALUE="no">
    <PARAM NAME="backgroun[i]Long postings are being truncated to ~1 kB at this time.

  • Embedding HTML into forms to make 3rd party Host Work

    My form looks wonderful!  Only one problem.... It doesn't work!
    It won't says the form was submitted successfully, but I don't receive it.  After reading a thread that said I have to make sure my host provider enables PHPmail, I contacted them they said I need to enter the following:
    mail("receiving-email","subject","message-body","headers");
    Into the form to make it work.
    Is this right?
    If so, how and where in the form do I embed it.  I don't want to screw up the widget.  I opened the html page for the form, but again I don't know where to put this line, if at all.
    Thanks in advance,
    Doc

    i tried uploading using FILEZILLA and everything worked perfectly!!
    consider this solved!!

Maybe you are looking for