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
Similar Messages
-
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> -
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 a jsp variable into javascript??
<p><%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<p><%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<p><html>
<p><c:set var="binrmapi" value="http://localhost/paas-api/bingorooms.action;jsessionid=XXXXXX?userId=TEST2&sessionId=1&key=1" />
<p><c:import var="testbinrm" url="${fn:replace(binrmapi, 'XXXXXX', jsessionid)}"/>
<p><c:set var="tuples" value="${fn:split(testbinrm, '><')}" />
<p>Time until next game
<p><c:forEach var="tuple" items="${tuples}">
<p><c:if test="${fn:contains(tuple, 'row ')}">
<p> <p><code>
<p> <c:set var="values" value="${fn:split(tuple, '=\"')}" />
<p> <font color="blue">
<p> <c:out value="${values[17]}" />
<p><c:set var="remainingtime" value="${values[17]}" />
<p> </font>
<p> </code>
<p></c:if>
<p></c:forEach>
<p><form name="counter"><input type="text" size="8" name="d2"></form>
<p><script>
<p>var milisec=0
<p>var seconds=eval("document.myForm.remaining").value;
<p>function display(){
<p> if (milisec<=0){
<p> milisec=9
<p> seconds-=1
<p>}
<p>if (seconds<=-1){
<p> milisec=0
<p> seconds+=1
<p> }
<br>else
<p> milisec-=1
<p> document.counter.d2.value=seconds+"."+milisec
setTimeout("display()",100)
<p>}
<p>display()
<p></script>
<p></body>
<p></html>
<p>This is my code that i was working on, in the jsp part of the script, i get a api call and save a value of time in the variable remainingtime.. and in the javascript, i try to have a countdown clock counting down the remaining time.. but i guess it doesnt work.. how can i get that working? thanks alot
Message was edited by:
hamham3001
Message was edited by:
hamham3001
Message was edited by:
hamham3001
Message was edited by:
hamham3001Re: How to pass a jsp variable into javascript??Here is the sameple one, hope it will solves your problem.
<html>
<body>
<form name=f>
<%!
String str = "A String"
%>
<script>
var avariable = <%=str%>
<script>
</form>
</body>
</html>
Let me know if you face any problem -
How to pass a JavaScript variable into a java method
I would like to know how to pass a JavaScript variable into a java method with in a <% %> tag inside a JSP file like so:
<%@ page contentType="text/html;charset=windows-1252"%>
<html>
<head>
<script LANGUAGE="JavaScript">
myValue = someDynamicValue;
<% System.out.println(myValue)%>
</script>
</head>
<body>
</body>
</html>
obviously "System.out.println(myValue)" will not work because myValue is seen as a java variable and not a JavaScript variable.
I would like to know how to let the jsp file, that I wrote in the above code, see myValue as a JavaScript variable and not a java variable so that I can pass it to a java method.
NOTE: the java method does not have to be a println() method, it can be any method of my choice.
NOTE: someDynamicValue is a JavaScript value that can dynamically changeI don't believe you can. JSPs are really just elaborate templates that an engine such as Tomcat parses and generates an HTML page based on. That page is then displayed to the user. By the time you want to use some function in Javascript, the JSP has already been parsed and generated.
Basically, Javascript and JSPs can't talk to each other. One's server-side and the other is client-side. -
How to save Pdf form localy without internet
How to save Pdf form localy without internet?
I thought in the beginning about advanced user rights and pure saving them on adobe reader but i saw legal notes about 500 user who can legaly save it localy and answer to me (bu they can`t answer to my client who paid me for doing this form).
Other thing is to do Air Application which would collect data from Pdf Form and save it (localy without internet) to use it later.
I thought about that second possibility but i can`t find any clue to do it myself.
Any help will be appreciated...Hi,
Are you downloading responses as PDF forms after forms are submitted? If so, FormsCentral doesn't provide an option to exclude empty fields and you won't be able to save PDF forms without empty fields.
You can use this form to "vote" on popular feature requests, or to add a new one of your own:
https://adobeformscentral.com/?f=XnF-KJVCovcEVQz9tZHYPQ
Thanks,
Wenlan -
How to pass the USER variable to RPD in 11g?
I am trying to figure out how to pass the USER variable to the RPD in 11g.
In 10g, I had define an intializtion block to store the USER variable and pass it to a statement that has to be executed before the query is executed.
We use the Oracle VPD technology that allows to restrict data access. This is the statement that has to be executed before a query can run.
select vpd_adwh.setclnvpdcontext_fnc('VALUEOF(NQ_SESSION.cuser)', UPPER(:USER))) from dual
That is the 10g version and it works fine.
In 11g, I tried to use
select vpd_adwh.setclnvpdcontext_fnc('VALUEOF(NQ_SESSION.cuser)', UPPER('VALUEOF(NQ_SESSION.USER)')) from dual
but this is not working.
Any help?any ideas?
-
How to pass the FORM Fields value by Form Personalization
Hi ALL,
I want to pass form filds values in to procedure. I am calling this procedure through form personalization of that form..... But it's not accepting any form field's value there... when i am passing hardcoded vales procedure is executing fine...
can any one suggest what to do???
i tried with these syntax
TEST_EMP_FP(:ADDR.ADDRESS_ID,'ABC')
TEST_EMP_FP(${item.ADDR.ADDRESS_ID.value},'ABC')
Regards
RaviHi,
Iam calling an SRS from forms personlization. Can any body tell me how to pass the Form field values as parameters to the Reports. (Example when they call this Concurrent request from Transact5ions screen, The invoice number should be defaulted in the report parameter).
Regards,,
Anil. -
How to swap two string variables without using a 3rd variable?
How to swap two string variables without using a 3rd variable?
ex.
A = "aa"
B = "bb"
Result required
A = "bb"
B = "aa"
ThanksHow to swap two string variables without using a 3rd
variable?
Something like this.
Append A with B (so A equals "aabb")
Set B equal to a substring of A starting with the first character and ending at A's length minus B's length. (So B equals "aa")
Set A equal to a substring of A starting from B's length and ending at the end of A. (So A equals "bb") -
How to pass Unix environment variable to a SQL procedure or SQL * Plus
Can any body suggest me how to ,
How to pass Unix environment variable to a SQL procedure or SQL * Plus file..
I am trying to invoke a SQL Procedure from Unix
by passing the value of a Unix environment variable.
Is it possible..?
Thanks in advance.
Regards,
Srinivas JaltaruWithin your shell script you can use what is known as a "here document" which is basically a way of wrapping a call to Oracle. The following call to Oracle loops and writes rows to files with numerically increasing file names. Two unix shell variables are used, one in a select statement and one in a spool command :
<pre>
#!/bin/bash
export ORACLE_SID=DEV05
FILENO=1007351
while [ ${FILENO} -le 1008400 ]
do
FILENAME=farm_${FILENO}.txt
DUMMY=`sqlplus -s user20/user20 <<SQLSTOP
set lines 73
set pages 0
set head off
set termout off
set echo off
set feedback off
select rpad(searchx, 8)
from blastx@PRODUCTION
where searchx = ${FILENO} ### here's a shell variable
spool /export/home/user20/sql/psiblast/BACKUP2_D/${FILENAME} ### here's a shell variable
spool off
SQLSTOP`
FILENO=`expr ${FILENO} + 1`
done
exit 0
</pre> -
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. -
How do I a form submit without losing page parametes on other portlets?
I have a page with several portlets. How can I make one of the portlets do a form submit without losing page parameters in other portlets?
If I do a submit only the controls in the form I have submitted are passed which means I loose parameters that where passed earlier.
I looked at the code the portal uses for the next button and I see that it does a POST with the action being the complete current URL with existing parameters. When I do this I cannot access the form variables in my dynamic page.There are 3 steps to the balancing act of image weight (file size) vs image quality
1) image dimensions (on screen height x width measured in pixels is all that counts). Smaller dimensions = smaller file size.
2) compressed file type (JPEG for photos, PNG or GIF for everything else). Choose the right file type for your image.
3) quality of the final compressed image - visually comparing the final image for "acceptableness" (less artifacts) vs final file size
There are plenty of tutorials online
http://inobscuro.com/tutorials/read/35/
http://sixrevisions.com/web_design/comprehensive-guide-saving-images-for-web/ -
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 can we use form variable in where clause while personalization
Dear,
I have a requirment for using select in personalization, actully we have created temporary table, now we want to get data from select satatement on event"when-new-record-instance' trigger, now in action tab i have selected action which is property and message, in message column showing value "${item.q_res.transaction_id.value}" it shows on validate button but when this form variable use in action type(property) which is consist on select statement "=SELECT to_char(QTY) FROM TEST_TABLE where transaction_id = ${item.q_res.transaction_id.value}" system didn't get value pressing validate button although there is a single record in customize table while without where cluase was getting data perfectly.
please advice.>
I am looking for to decode the actual db value something in different for my report.
like if A then Accepted
elseif R then Rejected
elseif D then Denied
these conditions I have to check in where clause.
>
what are you trying to do?
may be you are looking for
select * from tab1,tab2
where a.tab1 = b.tab2
and
(decode(:code, 'A','Accepted') = <table_column>
or
decode(:code, 'R','Rejected') = <table_column>
or
decode(:code, 'D','Denied') = <table_column>
) -
How to pass values to variables in WAD 7.0 using java script
Hi.,
My requirement is based on WAD 7.0.
The sales value has to displayed in WAD using graph with various chart types.
I have created variables for plant and material group in a query.
I have created drop down box for plant with all plants in it, check box for material group and a Submit button in WAD in FORM tag of HTML coding.
Once all the values are set in drop down box, checkbox and if the user clicks on submit button, the values has to captured by the variables for which I have created and the graph has to be aligned to the new values in variables.
Kindly help me how to use java script to get the values from FORM and pass it to variables.
Regards,
SelvaHi Selva,
You do not need to use Javascript for this. Instead you can achieve this by using API Commands in WAD 7.0.
Please configure Action on the ButtonGroup webitem to use 'Commands'.
->Choose Command 'Set Variables Values / SET_VARIABLES_STATE' under Commands for Web Templates
->Set Display Variable Screen setting to OFF
->Choose Query Variable for Plant, Select Variable Type as 'Binding Type', Binding Type as 'Data Provider Selection', Data Provider as the one you have assigned to the Dropdown webitem, Characteristic as 0PLANT or as that assigned to the Dropdown webitem
->Repeat above steps for Query Variable Material Group
Now when you make a selection from the Dropdown webitems, the Chart output will change accordingly. Let me know if this helps.
--Priya
Maybe you are looking for
-
Cannot delete item from junk mail folder in iPad?
Some items cannot be deleted from junk mail folder on iPad 2. It will not move to trash.
-
Current state-Interfaces built in between SAP payroll and ECC that brings in each employees cost into their cost centre. Future State-Cost reporting is at cost centre, plant, equipment and functional level . How can this be covered?
-
Hi Everyone, I was wondering if there was a way of placing a pre-defined table in a master slide, with the desire to allow users to fill in table cells. An example would be a simple problem statement. *The problem of:* <insert content> Affects: <inse
-
Adobe LiveCycle Designer License terms and conditions
Hello Guys, I am aware that Adobe LiveCycle Designer is available on SAP market place and following are the notes which has information about it. 962763 Adobe LiveCycle Designer 7.1 Installation 1121176 - Adobe LiveCycle Designer 8.0 - Installation
-
DV3T, Windows 7, Broadband Network Device
I finally got my Windows 7 upgrade disk. The recommended way (by HP) to do the upgrade was to, well, do the upgrade, but the installation froze. I did the "custom" option, a clean install, which I sort of wanted to do anyway because of all the crapwa