Want to pass Applet form variables without showing it on URL Location

I am running one applet with some form variables. After submit I want to pass those to .asp file to store into database.
If I use URL method then all are getting displayed on URL location of browser which I do not want. I want to pass many form variables to another .asp file, so it may not be good also.
What is the best way of doing it ? Need urgent help about it.

I tried following code using URL Connection Object, Code is running fine in IE and Appletviewer, but not running in Netscape.
Following is the code:
There is an applet with form. After Submit button, The form variables will be send to ASP script where I am storing it into database. In Netscape the server connection is made (blank record is getting created) but data is not passed.
public void actionPerformed(ActionEvent event) {
try{
ByteArrayOutputStream byteStream = new ByteArrayOutputStream(512);
PrintWriter out = new PrintWriter(byteStream, true);
String postData = "firstName=manisha";
out.print(postData);
out.flush();
URL dataURL = new URL("http://manisha/appletexamples/confirm-px.asp");
URLConnection connection = dataURL.openConnection();
connection.setUseCaches(false);
connection.setDoOutput(true);
String lengthString = String.valueOf(byteStream.size());
connection.setRequestProperty ("Content-Length", lengthString);
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
byteStream.writeTo(connection.getOutputStream());
BufferedReader in =
new BufferedReader(new InputStreamReader(connection.getInputStream()));
String line;
while((line = in.readLine()) != null) {
System.out.println("line: " + line);
     } //while
     in.close();
} //try
catch(Exception e){}//catch
}//action performed
My ASP Code
<%
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open("DATABASE=phptestdb;DSN=phptestdsn")
%>
<HTML>
<HEAD>
<TITLE> A Sample Program </TITLE>
</HEAD>
<BODY>
<%DIM fname
fname = ""
fname = Request("firstName")
response.write ("fname : " & fname)
qrystr1 = "insert into applettesttable (fname) values ('" & fname & "')"
conn.Execute qrystr1
conn.Close
Set conn = Nothing
%>
</BODY>
</HTML>

Similar Messages

  • How to pass Applet form variables without showing it on top ?

    I am running one applet with some form variables. After submit I want to pass those to .asp file to store into database.
    If I use URL method then all are getting displayed on URL location of browser which I do not want. I want to pass many form variables to another .asp file, so it may not be good also.
    What is the best way of doing it ? Need urgent help about it.

    Well If you create a POST request instead as a GET request the variables will not show up in the URL.
    On tips how to do that you can either check out this thread:
    http://forums.java.sun.com/thread.jsp?forum=31&thread=56388
    or one of these:
    http://search.java.sun.com/Search/java?qt=applet+GET+POST+variables&col=javafrm&rf=0
    Sjur

  • Passinf Form variables without ?id=

    Hi<br /><br />I have a mix of ADDT and non ADDT form ages.<br /><br />The pages are a multi part form where each part of the form submits to a new page with the previous page form details passes as variables like so<br /><br /><?php<br />    $gradeselection = htmlentities($_POST['gradeselection']);<br />     ?><br /><br />and passed as a hidden field<br /><br /><INPUT TYPE="hidden" name="cust_email"<br />VALUE="<?php echo $gradeselection; ?>"><br /><br />Then on the final page everything is submitted to the DB table.<br /><br />Part of the form requires a file upload which I am using the ADDT part of the form. However the $_POST does not pass the form file field to the next page unless I append a .php?id=. The trouble with that is it stops the other form $_POST variable being passed.<br /><br />So my question is how do I pass the ADDT form field variable?<br /><br />Cheers<br />Laurence

    Hi Gunter
    <br />
    <br />Its been a while since I was in the forum. I hope you are well.
    <br />I know I can do it pssing the dynamic data placeholder. I was attempting to get the same result using $_POST and a hidden field.
    <br />
    <br />This works well in non ADDT formsbut does not seem to with ADDT forms.
    <br />
    <br />To do this normally I use the following code in a include file
    <br />
    <br />***CODE****
    <br /><?php<br />function field_forwarder() {<br />    global $_POST, $rEM979, $FFoutputType;<br />    $fieldForwarder = '';<br />    /* get the arguments passed */<br />    $argList = func_get_args ();<br /><br />    /* globalize any other set of instructions */<br />    if (count ($argList)) {<br />        eval ('global $' . $argList[count($argList)-1] . ';');<br />    }<br />    <br />    /* set the default set of values to convert */<br />    if(count($argList)==0) {<br />        /* if the function is initially passed without<br />           parameter we're looking in $_POST */<br />        $argList[0] = '_POST';<br />        $startValue = $_POST; <br />        if (sizeof ($startValue) == 0) {<br />            return false;<br />        }<br />    } elseif (count ($argList) == 1) {<br />        eval ('$rEM979["' . $argList[0] . '"] = $' <br />              . $argList[0] . ';');<br />        $argList[0] = 'rEM979';<br />        $startValue = $rEM979;<br />    } elseif (count ($argList) == 2) {<br />        eval ('$startValue = $' . $argList[1] . '["' <br />              . $argList[0] . '"];');<br />    } else {<br />        for($e = count($argList) - 2; $e >= 0; $e--) {<br />            $intersperse .= '["' . $argList[$e] . '"]';<br />        }<br />        eval ('$startValue = $' . $argList[count($argList)-1]  <br />              . $intersperse . ';');<br />    }<br /><br />    foreach($startValue as $n => $v) {<br />        if (is_array ($v)) {<br />            /* call the function again */<br />            $shiftArguments = '';<br />            for($w = 0; $w <= count ($argList) - 1; $w++) {<br />                $shiftArguments .= '"' . $argList[$w] . '", ';<br />            }<br />            $shiftArguments = substr ($shiftArguments, 0, <br />                                     strlen ($shiftArguments) - 2);<br />            <br />            eval ('$fieldForwarder .= field_forwarder("' . $n . '"' <br />                  . substr(',',0,strlen($shiftArguments)) . ' ' <br />                  . $shiftArguments . ');');<br />                        <br />        } else {<br />            /* we have an root value finally */<br />            if (count ($argList) == 1) {<br />                /* actual output */<br />                flush();<br />                if ($FFoutputType == 'print') {<br />                    $fieldForwarder .= "\$$n = '$v';\n";<br />                } else {<br />                    $fieldForwarder .= "<input type=\"hidden\" "<br />                                    . "name=\"$n\" value=\"" <br />                                    . htmlentities(stripslashes($v)) <br />                                    . "\">\n";<br />                }<br />            } elseif (count ($argList) >1 ) {<br />                $indexString = '';<br />                for($g = count ($argList) - 3; $g >= 0; $g--) {<br />                    $indexString .= '[' <br />                                 . ((!is_numeric ($argList[$g])<br />                                 and $FFoutputType == 'print')<br />                                 ? "'" : '')<br />                                 . $argList[$g]<br />                                 . ((!is_numeric ($argList[$g])<br />                                 and $FFoutputType == 'print')<br />                                 ? "'" : '')<br />                                 . ']';<br />                }<br />                $indexString .= '[' <br />                             . ((!is_numeric ($n) <br />                             and $FFoutputType == 'print') <br />                             ? "'" : '') . $n <br />                             . ((!is_numeric ($n) <br />                             and $FFoutputType == 'print') <br />                             ? "'" : '') . ']';<br />                /* actual output */<br />                flush();<br />                if ($FFoutputType == 'print') {<br />                    $fieldForwarder .= "\${$argList[count($argList)-2]}"<br />                                    . "$indexString = '$v';\n";<br />                } else {<br />                    $fieldForwarder .= "<input type=\"hidden\" name=\""<br />                                    . "{$argList[count($argList)-2]}"<br />                                    . "$indexString\" value=\"" <br />                                    . htmlentities(stripslashes($v)) <br />                                    . "\">\n";<br />                }<br />            }<br />        }       <br />    }<br />    return $fieldForwarder;<br />}<br />?>
    <br />*****END CODE***
    <br />
    <br />In the head of the receiving page I would have something like
    <br />
    <br /><?php<br />    $gradeselection = htmlentities($_POST['gradeselection']);<br /> ?>
    <br />
    <br />and in the body
    <br />
    <br /><?php echo field_forwarder(); ?>
    <br />
    <br />This passes all the previous form fields as variables.
    <br />
    <br />Only does not work with ADDT form fields :-(
    <br />
    <br />Cheers
    <br />Laurence

  • How to pass a form variable from page to page

    I have a series of 4 forms on 4 pages that update a database.
    A variable from one of the forms (doesn't matter which one, if it's
    easier one way over another, let's go that way) is passed to the
    last page, where a PayPal button will appear based on the value of
    the form variable. I am using ASP javascript and an Access
    database.
    Thanks.

    jennivazquez wrote:
    > I have a series of 4 forms on 4 pages that update a
    database. A variable from
    > one of the forms (doesn't matter which one, if it's
    easier one way over
    > another, let's go that way) is passed to the last page,
    where a PayPal button
    > will appear based on the value of the form variable. I
    am using ASP javascript
    > and an Access database.
    Either store the variable in a hidden field in the
    intermediate forms,
    or use a session variable.
    David Powers, Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • How to pass applet variable to a jsp

    I just want to pass applet variable to a jsp page to access database. But how .
    Help me please.

    you can use showDocument() to show a page which could have values in the query string.
    you can use URLConnection to do GET or POST requests to a page.

  • Passing form variables in a single form

    I am trying to make a form to select a starting and ending
    month for a event search.
    I have 2 list boxes populated with the months, but I want the
    second box to begin from the first selection.
    So if the user selects may in the first box, the second box
    should list from may to december.
    Is there any way to pass a form variable to another field
    inside the same form?
    I want to use a conditional <cfloop> to populate the
    second box like <cfloop from= #variableA# to= 12>
    then have the <options> inside the loop.
    Thanks in advance for any help you can provide...this one has
    me stumped!

    You can do it with javascript. Google related selects, there
    are lot's of examples out there.
    What happens if the user selects December in the 1st
    box?

  • Form Variables Don't Pass for Some Clients

    Recently, I’ve noticed some problems on one of my pages
    where form field variables aren’t passing to my action page.
    As far as I can tell, this is a new problem.
    This is the error I’m getting:
    Error resolving parameter FORM.EMAIL
    The specified form field cannot be found. This problem is
    very likely due to the fact that you have misspelled the form field
    name.
    The error is thrown when a cfquery is unable to find the form
    variable.
    The query looks, basically, like this:
    <cfquery name="Iogin" datasource="dsn">
    SELECT Count(*) AS Match
    FROM Users
    WHERE users.email = '#FORM.email#'
    AND users.password = '#FORM.password#';
    </cfquery>
    I know I could squash these errors with a cfparam or with
    other error checking, but what I’m really concerned about is
    why the form variables aren’t there. I have tested the form
    on a number of my internal clients and have not been able to
    replicate the error as it is being triggered from outside clients.
    I am able to submit a blank form or a complete form without any
    errors being thrown. I have established that the form submissions
    are coming from my site and are not being submitted by an outside
    domain.
    QUESTIONS:
    1. Does anyone know what might be happening to cause the form
    variable to disappear? Shouldn’t all the forms variables be
    submitted when a user hits the submit button, regardless of whether
    there is data in the form field?
    2. Could a firewall on the clients’ end be withholding
    the form variables without notifying the user?
    3. Have there been any recent changes to browsers that could
    be holding back form variables?
    Any help would be greatly appreciated!

    @Azadi
    quote:
    from your posts it looks like this happens to different forms
    in your application (you mentioned the email field and also a
    select box, which is presumably in some other form)
    I was able to resolve the problem with the second form (the
    one with the select box, not the one posted above). A JavaScript
    resided on that action page which triggers a service. The service
    (similar to GoogleAds) receives the page’s url from the
    JavaScript and then the service comes back and loads the page to
    evaluate the page’s content. The result: Action pages being
    loaded with no form content. My error reporting, very similar to
    what insuractive suggested, helped solve this problem.
    HOWEVER, we still periodically have trouble with the other
    form. I know from speaking with at least two users that the problem
    is a direct result of users following the planned application
    flow—form to action page. So this discussion is still
    relevant.
    @insuractive
    quote:
    you should make sure you test to see what happens when the
    client has javascript and/or cookies disabled on their browser.
    This is a good thought. I’m embarrassed to say that I
    haven’t tried accessing this form with cookies and JavaScript
    turned off. I will try this and report back.
    Thanks to all of you who are offering suggestions.

  • CAN I PASS FORM VARIABLES TO THE DATABASE PROCEDURE IN PERSONALIZATION

    When I try to use form variable in the database procedure call from personalization I get the attached error.
    Under forms personalization
    From Actions tab --> builtin --> Execute Procedure when I call a database procedure and pass one of the form variable as parameter I get "ora-01008 couldn't be validate" error
    Can we pass on form variables to the database package using personalization ? If yes, then is this the right way?
    Message was edited by:
    omitchel

    I tried customizing the Quoting Form, it works.
    What you have done is correct, but this is how you call it
    ='begin
    db_proc('''||${item.qothddet_main.quote_name.value}||''');
    end'
    here
    qothddet_main : block name
    quote_name : item name
    Thanks
    Tapash

  • How do I pass a local variable as a parameter to a JSP Tag File?

    I wrote a custom JSP tag file, and I want to pass a local variable to it through a parameter, like this:
    <% Integer someValue = new Integer(-5); %>
    <my:TestTag value="someValue"/>
    This doesn't work though - the result is the string someValue. Trying to do this doesn't work either:
    <% Integer someValue = new Integer(-5); %>
    <my:TestTag value="someValue"/>
    the value attribute ends up being null.
    I know I can work arount by putting the local variable in the request attributes then using ${}, but that seems like a lot of unecessary work. Does anyone know I can just pass a local variable to the custom tag through the custom tags parameter list?

    I'm far from beeing an expert, but this may be a clue (?)
    Basically, the rule is: everything you want to be considerred as Java must be in a
    JSP tag.
    As an example, think of how you would do to pass the litteral string "someValue" otherwise. Then you may imagine other related issues...

  • How do I pass a username form variable from a drop down list/menu to another page?

    Hi,
    I have a login_success.php page that has a drop down list/menu (which lists usernames). I want the user to click on their user name, and when they click the submit button the username information to be passed over to the username.php page which will contain a recordset, sorted by username.
    How do I pass the username info from the drop down list/menu to the username.php page?
    The drop down menu is connected to a recordset listUsername, I have filtered the recordset with the Form Variable = username, and I have used the POST method to send the username to the page username.php. I'm not sure how to structure the php or which page to place it on.
    <form id="form1" name="form1 method="post" action="username.php">
         <label for="username_id">choose username:</label>
         <select name="username_id" id-"username_id">
              <option value="1">username1</option>
              <option value="2">username2</option>
              <option value="3">username3</option>
              <option value="4">username4</option>
         </select>
         <input type="submit" name="send" id="send" value="Submit" />
         <input type="username" type="hidden" id="username" value="<?php echo $row_listUsername['username']; ?>" />
    </form>
    Could somebody help me please?
    Thanks.

    I would not post the variable over, In this case I personally would send it through the URL and use the $_GET method to retreve it. For Example.
    <html>
         <head>
              <title>Test Page</title>
              <script type="text/javascript">
                   function userID(){
                        //var ID = form1.userIDs.selectedIndex;
                        var user = form1.userIDs.options[form1.userIDs.selectedIndex].value;
                        window.location = "test.html?userID=" + user;
              </script>
         </head>
         <body>
              <form id="form1">
                   <select name="userIDs" id="userIDs" onchange="userID();">
                        <option>Select a User</option>
                        <option value="1">User 1</option>
                        <option value="2">User 2</option>
                        <option value="3">User 3</option>
                        <option value="4">User 4</option>
                   </select>
              </form>
         </body>
    </html>
    //PAGE TO RETRIEVE THE USERNAME
    <?php
    if(isset($_GET['userID'])
         $userID = $_GET['userID'];
         echo $userID;
         die;

  • E-mail adobe interactive form without showing it..

    Hi experts!
    I am trying to create a WD apllication in which when the user presses a button an adobe interactive form will be called and e-mail, without showing the actual form.
    From what i saw in the corresponding tutorial, in order to attach the file to the e-mail, the file must first exist in pdf format.
    But, during runtime all i have is the pdfsource.
    So, the point is: how can i create the actual pdf from the pdf Source without showing it???? 
    Thanx in advance!!!!

    Hi,
    actually I would not recommend that. That's something which has to be programmed completely new and does not exist at the moment. If you want to have it outside in the internet for externals you will force candidates to use Adobe Acrobat reader in a certain version and might get browser problems. So technical support might become an issue.
    So the only opportunities you have without creating something new, is using Web Dynpro standard or a third party tool based on flash.
    Best regards

  • Passing FORM variables through CFSET

    I am writing an account creation page for my site. After the
    user inputs the required information, I would like to 1. confirm
    that their email is not a duplicate of another user 2. Pass them
    off to another page that allows them to confirm the information
    that they input and submit the info to the database. I would like
    to have the email confirmed on that page through passing the
    FORM.email variable to the #CGI.SCRIPT_NAME#. If the RecordCount on
    the query for duplicate email addresses comes back VALUE=0, use
    CFLOCATION to pass to the next page with the FORM variables intact.
    However, as forms can only have one action attribute, what is the
    best way to do this, in your opinion?
    Thanks so much for your help!
    dan

    use session var to store form data:
    - user submits form.
    - form posts to same page (to itself).
    - check for duplicate email
    - if no duplicate found, copy form to a sesion var and
    cflocate to next
    page; if duplicate found show error to user
    - on next page display user-submitted data from the session
    var
    make sure session vars are enabled in cf administrator and
    sessionmanagement is enabled in your appliction.cfm/cfc
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/

  • How do I get my bookmarks to display again in a column on the left of my screen, just as it always has and the way I like them. I do not want to use full screen display without the bookmarks showing.

    I have a full screen and cannot see my bookmarks.
    How do I get my bookmarks to display again in a column on the left of my screen, just as it always has and the way I like them. I do not want to use full screen display without the bookmarks showing.

    View > Sidebar > Bookmarks (Ctrl+B)
    Press F10 or tap the Alt key to bring up the "Menu Bar" temporarily.

  • I want to create a form that I can change at an instance that will store the information without replacing it

    I want to create a form that I can change at an instance that will store the information without replacing it: Here are examples of what i have:
    This is the form:  The True/False in column B are actually check boxes
    Date
    Job Name
    Start
    End
    Hours Worked
    Per Diem
    Wednesday, Mar 5, 2014
    Duke University
    7:30 PM
    2:30 AM
    7.00
    Arellano, Paul
    TRUE
    Wednesday, Mar 5, 2014
    Duke University
    7:30 PM
    2:30 AM
    7.00
    0.00
    Blackwell, Zach
    FALSE
    Christian, Charles
    TRUE
    Wednesday, Mar 5, 2014
    Duke University
    7:30 PM
    2:30 AM
    7.00
    0.00
    Christian, John
    FALSE
    Currence, John
    FALSE
    Curtis, Brandon
    FALSE
    Hawkins, Tyre
    FALSE
    King, Corey
    FALSE
    Nunez, Jose
    FALSE
    Rangel, Antonio
    FALSE
    Rice, Eric
    FALSE
    Salgado, Ricardo
    FALSE
    and the sheet that the index to looks like:
    Saturday, Mar 15, 2014
    Rice, Eric
    Providence College
    9:00 AM
    7:30 PM
    10.50
    1
    Saturday, Mar 15, 2014
    Rice, Eric
    Virginia Beach
    7:30 PM
    2:30 AM
    7.00
    Saturday, Mar 15, 2014
    Salgado, Ricardo
    0.00
    Sunday, Mar 16, 2014
    Arellano, Paul
    Providence College
    7:00 AM
    8:00 PM
    13.00
    1
    Sunday, Mar 16, 2014
    Blackwell, Zach
    0.00
    Sunday, Mar 16, 2014
    Christian, Charles
    0.00
    Sunday, Mar 16, 2014
    Christian, John
    0.00
    Sunday, Mar 16, 2014
    Currence, John
    Providence College
    7:00 AM
    8:00 PM
    13.00
    1
    Sunday, Mar 16, 2014
    Curtis, Brandon
    0.00
    I want to be able to fill out the form and it place itself into Sheet 1 without changing everytime.  I can index the array from the form, but it changes everytime.

    You think it would be the other way around.
    Just speculation, but forms probably came to iOS first because of likely use for data entry in the field that syncs back to the Mac.  On a small screen with a touch interface, forms make inputing values easier.
    On the Mac, with its bigger screen, typing directly into a data table often works well enough.
    SG

  • Pass HTML form to portlet without FormBeans

    I have an html page with a simple form. I want to have the form submitted via
    post to a portlet inside a portal and have a portlet read in the values from the
    request object.
    The problem is that the values don't show up in the HttpServletRequest object,
    so I'm guessing that there is a request object in the portal framework....how
    do I access the request object inside the portal framework????
    Thanks.

    "heidiwags" <[email protected]> wrote:
    >
    If you submit the form via an action in a page flow, in the action, you
    can use
    the ScopedServletUtils.getOuterRequest(getRequest()) to grab the HttpServletRequest
    "CW Hunter" <[email protected]> wrote:
    I have an html page with a simple form. I want to have the form submitted
    via
    post to a portlet inside a portal and have a portlet read in the values
    from the
    request object.
    The problem is that the values don't show up in the HttpServletRequest
    object,
    so I'm guessing that there is a request object in the portal framework....how
    do I access the request object inside the portal framework????
    Thanks.
    Thank you!

Maybe you are looking for

  • BDC to save text in VL02N

    Hi All, I have a requirement of adding a BDC logic in my program . While recording, I need to call the transaction  VL02N and update the delivery number and: add some text under the tab:      Texts-> Body Text and save the same. I am able to record u

  • There is no server available at the address you entered, codes: 25294, 9848

    About a month ago I rebooted the server and after that Server Admin hasn't worked. It says always: "There is no Server available at the address you entered". In /var/log/system.log: Jul 22 11:58:51 mail servermgrd[14205]: SecIdentitySearchCopyNext re

  • How do I save a streaming audio of a public meeting?

    Hi, On behalf of the community non-profit group I volunteer for, (I am a self taught website administrator for them) I am trying to save a streaming audio of a public meeting that has an extension of .ashx, I dragged it to itunes to play.  I have no

  • APPCRASH with Photoshop CS/Windows 7

    I bought a new computer with Windows 7 (8 GB Ram).  I installed Photoshop CS (v. 8.0) which I had used on my previous XP system.  For a week I used the program regularly and had no problems.  Sometimes I would edit files for hours at a time. Suddenly

  • Damaged Installer for Mac OS X Lion

    I have tried numerous times to install Adobe Flash Player (versions 10.3.183.5 & 11.0.1.152) on Mac OS X Lion.  Every time the installer proceeds to approximately 5% completion, then fails with the following message: The installation failed.  Get sup