Post Submit Twice Or More
Hi Everyone!
We have this problem
- user claims to click/submit once
- access.log shows the same form submitted twice or more at the same exact time
I don't know whether it is due to firewall or any other settings in Weblogic 8.1 SP3 which I am not aware of. Also, could it be also because of the hyperlink we're using instead of "input" submission? Please advise. Any help would be appreciated!
Attached below is the snipplets of code.
Thanks in advance,
Hardy
<P>
<p>Load File <br><br>
function SubmitUploadForm() <br>
{ <br>
if(!isSubmit)<br>
{<br>
isSubmit = true;<br>
var inputFileTextBox =
document[getNetuiTagName("uploadForm")][getNetuiTagName("inputbox")];<br>
<br>
if (inputFileTextBox.value == '')<br>
{<br>
disableProcessing();<br>
}<br>
else<br>
{<br>
enableProcessing();<br>
}<br>
document[getNetuiTagName("uploadForm")].submit();<br>
}<br>
}</p>
<p>function disableProcessing()<br>
{<br>
document.getElementById ("processing").style.display =
'none';<br>
document.getElementById ("button_disabled").style.display =
'none';<br>
}</p>
<p>function enableProcessing()<br>
{<br>
document.getElementById ("processing").style.display =
'inline';<br>
document.getElementById ("button_disabled").style.display =
'inline';<br>
document.getElementById ("button_enabled").style.display =
'none';<br>
}</p>
Hi
Check at www.javaranch.com ( search for double request )
Jin
Similar Messages
-
Help needed, double post-submit on Oracle 9iAS ?
Hi,
I am working on a project where we make use of Oracle Application Server 9.0.3 in combination with OC4J and struts. During development we have made use of JDeveloper 9.0.3 and its integrated server for testing the application. Unfortunately we have been waiting too long with deploying the app on the 'real' (Oracle IAS) server, and now we found out that when deploying the application on IAS, some parts of our application do not seem to work anymore.
After a little investigation we found out that all POST submits of our forms seem to be submitted twice.
Since we did some Javascript-evaluation before submitting, we first thought that that the problem was client-side, but after adding code to make sure that the submit will only occur once (flag set to 1 before submit, and only submit when flag = 0 etc..), the problem still persists...so the submit does not come from our document.formx.submit() command...
Let me restate that this double posting does not occur within the JDeveloper-test-environment using the same browser.
Now convinced that the problem was server-side, we thought we could focus on this side. Unfortunately, after an occasional test with a Mozilla-browser (our default (customer) browser is IE6), the problem did NOT occur !
So, to sum things up :
- Javascript does not submit twice
- On the server, the logging indicates a double post-action
- On client-side, only a single-post is allowed...
- mozilla does not seem to cause problems, while IE6 does.
- JDeveloper runtime environment does not expose the problem (with either browser, it goes smooth), while deploying on the IAS 9.0.3 server does...
Can anyone shed some light on this ? We've been looking into it for a day already, and need to get it fixed asap (as always ;o))...
Thanks for any info,
Bas van DrielThis sounds like a strange java problem not IAS
From the sun site
"When I try to open a file through my Java Web Start application, a message box pops up with the title "javaw.exe - No Disk". Why does this happen?
This is a bug in the Java 2 SDK v1.2.2 or v1.3 . This bug will be fixed in a future Java 2 SDK release. In the meantime, there are a couple workarounds: "
Id be very tempted to remove any JDK/JRE installations, or even better start with a clean machine.
Hope this helps. -
Disable submit twice with valid spry validation
Is there a line of javascript that can be added to the textfield .js file (or elsewhere) to disable the submit button if clicked, only if all spry fields are valid so users/clients don't submit twice? But stay active if spry fields are invalid so users can make corrections and submit again?
In my simplistic way of thinking, if the SpryValidationTextField.js script already tells the form to stop submission and give error messages if textfields are invalid
Correct, but without the click on the submit button, there is no trigger, hence no error messages.
I guess we could simulate a form submit. Maybe you would like to play around with
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet">
</head>
<body>
<form id="myForm" action="" method="post">
<div id="sprytextfield1">
<label for="text1"></label>
<input type="text" name="text1" id="text1" onkeyup="validateEnableSubmit();">
<span class="textfieldRequiredMsg">A value is required.</span> </div>
<div id="sprytextfield2">
<label for="text2"></label>
<input type="text" name="text2" id="text2" onkeyup="validateEnableSubmit();">
<span class="textfieldRequiredMsg">A value is required.</span> </div>
<div id="sprytextfield3">
<label for="text3"></label>
<input type="text" name="text3" id="text3" onkeyup="validateEnableSubmit();">
<span class="textfieldRequiredMsg">A value is required.</span> </div>
<div>
<input id="myButton" name="myButton" type="submit" disabled>
</div>
</form>
<script src="SpryAssets/SpryValidationTextField.js"></script>
<script>
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");
var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3");
function validateEnableSubmit(){
var myForm=document.getElementById("myForm");
var validForm = Spry.Widget.Form.validate(myForm);
if(validForm == true)
document.getElementById("myButton").disabled = false;
else
document.getElementById("myButton").disabled = true;
</script>
</body>
</html> -
Folders appear twice or more in finder
I'm having trouble with a couple of macs that I just freashly installed Tiger 10.4.6. These machines are all dual 2ghz G5, they connect to the same server, which is a dual 2.3Ghz G5 running OS X server 10.4.6. I have other macs with the same software version with all the same patch applied, including the last security update, but none with the Quicktime 7.1 update. The problem is that they sometime see the same folder twice or more on the server. They can change from list view to icon view to column view with no change on that behavior. If they click on either of the folder, they see the same content, this is basicly a ghost, or a twin, or whatever you want to call it. If you delete one, all folders with the same name are gone (it's a good thing we have good backups, because it happened a couple of times).
I've restated the server and ran Cocktail and repaired permission with the disk utility. Done the same thing on all 3 macs having this problem, and they still see the problem. The only mean to eliminate this duplicate is via an application and saving a document in one of the folder, which will then realise has a double and will appear has just one folder. Some other time, the opposite appends. From Illustrator CS2, if you save as pdf in a folder, it will duplicate it has often has you have exported pdf to it. So if you export 6 different document to pdf in the same folder, it will appear 6 times in the finder! Very annoying and confusing for the users.
Anybody seen this? I've looked everywhere but couldn't find anything.
TIA
JeffMorten,
I have since found that the problem is related to the .DS_store files. If you delete it from the parent folder, the ghost disapears. I found a little application that does this and is easy to use, it's called "DS_Store cleaner" and it's free. It doesn't solve the problem for the future though, but it might illimenate any corrupted .DS_Store files on the server.
Another thing I read, but didn't implement because of the side effects is to set the clients to NOT write the DS_Store on the server. This of corse means that they won't have their settings kept when reopening the folder, that's why I didn't implement it yet, still need to see if it's worth it.
Here is the URL from Apple tech note
http://docs.info.apple.com/article.html?artnum=301711
Keep me posted
Jeff -
Hello, didnt really know hwere to post this guess it more belong under like "computers" generally,
but! For a while...
(-THE LONGER VERSION) :
No whait!, let me start where it all began, 2009, a december (erhh.. iii think? Hwatever!) litlle me hwere nearly Totally blank to the computer world. And suddenly it stood there on the table, a shining (it was shining back there) new "hp pavillion entertainment pc" with its smell of fresh plastic mixed hwith the strong smell from the cardboardbox, remember it as if it were yesterday
... Since then.... I have today a good solid pc knowing! (at more advance level cmd,bott menu, recovery, blah, blah... NERD!) here at the last awhile, ive prommised to make a lot! A lot of video projects!
(okay 2, but some big ones!) avchd multilayer 2 hours!!!!
So the poor hp laptop -dual core i2 4gb ram, has been begged to it knees! And simply cant handle it of course! and it have just trough time benn loaded with lots of crap, and is extremly noisy, heat, slow, anoying = unusable!
SO hwat i need is...
(-THE SHORTER) :
A computer setup that will EASILY! could handle stuff like that (avchd, multilayer, 2 hours project) -and simmilar. A total power machine! But Im tired of windows! And ugly cheap looking design! The times have changed and i change with them!
NOW I WANT APPLE!!
But but but... Hwat should i get????
1. Im NOT a billionare!
2. I repeat: NOT a billionare!
3. I also need portability for every day use beyond the hardcore creative editing and use
AT LAST:
i saw in front of me this genius plan... With a macbook pro, a tuned one, with as much of ram,cpu,gpu, and everything else as it can posibble have
-the perfect combination of transportabillity, everydayuse and total power!
When it gets combine with,
A cinemadisplay
A extra keyboard
And a extra magic mouse
And this power macbook pro, with screen, mouse, and keyboard i've found a really good offer at.
MY ACTUAL QUESTION.... :
Now it is yours turn to please! be creative! Please! Hwat does all you genius heads! think and say?
WILL A super tuned MACBBOK PRO COMBINED WITH ACCESSORIES, AT ALL, BE ABLE TO REPLACE A STRONG MAC PRO, OR AT LEAST BE MORE THAN ENOUGH FOR REALLY HEAVY STUFF? And if yes, HOW strong actually (ram,cpu,gpu...) will it need to have to be "more than enough"?
If no, what would all of you then suggest that is perfect in relation to everything?
PLEASE ANSWER!!Jonatan R. wrote:
WILL A super tuned MACBBOK PRO COMBINED WITH ACCESSORIES, AT ALL, BE ABLE TO REPLACE A STRONG MAC PRO,
No,
the MacPro is the muscle machine and not constrained by power or cooling limitations like the MacBoo Pro is.
OR AT LEAST BE MORE THAN ENOUGH FOR REALLY HEAVY STUFF?
If you press the MacBook Pro like a desktop machine, it will blow fans like a hurricane but will do the job eventually.
The longer you blow fans on a laptop, the sooner it clogs up with crippling dust and shortens the life of the machine.
You'll need the top end 15" or better, not the 13" as it has no dedicated graphics, only CPU graphics.
Preferably if you just now getting into video, you should be considering Avid on a Windows 7 tower, it's because Apple has been ignoring the MacPro for hardware updates to improve it and it seems like they don't want to carry it anymore. Also the last Final Cut Pro version had Hollywood up in arms as Apple removed a lot of required abilities to make it more "consumer friendly" which upset the Pro market who likes control.
Apple is focusing on the consumer computing market and getting away from the "Pro" market which needs the heavier hardware to handle video needs. They stopped selling the X-RAID and the X-Server, so Apple really isn't a "computer" company any longer.
Sure you can use a MacBook Pro and a external monitor for doing home movies and such occasionally, but if your into serious production you need to consdier other options now.
There is nothing wrong in getting a MacBook Air and a Windows 7 professional video tower too. -
How to find out if a long String has a "subString" twice or more.
I need to find out if a long String has the same number twice or more.
I need to look matches for numbers running from 000, 001....999 and if a number is found twice or more, return that number and lines there were found.
example String:
-;000 ; 1 ; 2006-12-11 ; -; job;
x;001 ; 2 ; 2006-12-11 ; 2006-12-12; do this
-;002 ; 3 ; 2006-12-11 ; -; work
-;003 ; 0 ; 2006-12-11 ; -; some
-;004 ; 2 ; 2006-12-11 ; -; thing
x;005 ; 1 ; 2006-12-11 ; 2006-12-11; reads
-;003 ; 0 ; 2006-12-11 ; -; here
Should return from example String:
003 at lines 4 and 7
Any ideas?So there are newlines in the String?
You could use a StringTokenizer to break the String into lines, then searching on each line if it contains any of the search strings. (You need to clarify if a line can contain more than one search string).
Probably you should use a Map<String, Integer> to record the searchcounts.
Or an int[] Array if you are really sure that the Strings you search for really are numbers.
Another option is to use:
LineNumberReader lnr = new LineNumberReader(new StringReader(searchString));This will save you from explicitly having to take care for the line number.
In any case your example looks like the individual lines are semicolon separated fields and the numbers you search for always are in column two.
So after breaking up the original String in lines, you could use another StringTokenizer to break up the line in fields. -
User Status automatically checked when a order is scheduled twice or more
Hello Friends
We created a User Status called "Rescheduled" for Work Orders
We want that the system flag this status automatically when a order is scheduled twice or more in CM33
Is that possible?
Edited by: Davison Tadeu Avigo on Jul 14, 2011 4:23 PMDavison Tadeu Avigo
Yes it would be possible, but you would need to develop a solution for this..
PeteA -
How can I place a post-submit event into my form. I have Adobe Livecycle Designer 8.0. It doesn't show this event in the Script Editor.
I want to close the form after it has been submitted. I have a script for this action, but I do not know where to put it. I am using
app.execMenuItem("close");
I have tried placing this item in the Pre-Save Event and it works fine if you manually send the form via email. However, I receive an error from the Adobe 8 Distribution Wizard, when I try to send the Form to my Distribution List.
Does anyone know what I am doing wrong?
Thanks,
JenThe post Submit event was not exposed in version 8 that is why is does not appear. You could hide your actual submit (make it invisible), then put a regular button on the form that will be the users submit. On the click event you would hit the submit button then run your close code. So it would be something like this:
RealSubmitButtonName.execEvent("click");
app.execMenuItem("close"); -
If I do this will other user on this Mac be able to submit (and share) more in that same folder? Building up one continuous shared media folder.
Yes, that is correct. The organizer is just a database, so your photos are wherever you put them intially. Did you import from iphoto? In that case, organizer does make duplicates (to avoid writing into the iphoto library, which would be a Bad Thing to do). If you didn't specify a location, the copies that PSE uses will be inside subfolders in the Adobe folder in your Pictures folder.
-
How to prevent submit twice?
i just use jsp and jstl.
There is some way can prevent submit twice?
i use sql in jdbc, first get the last record in table, compare the submit data and the last record, if same, prevent submit.
but it can't check the date -- not the last record, same with the submit record.
anyway can do it?what he/she is saying that you can put unique key on you databse that you cannot duplicate inserting records.. another way is to put javascript confirm box.. that way your client has to click ok to submit your form and it can prevent the user from double clicking your submit button.
-
Hello all.
I'm writing a jsf app that takes an input form, validates it, and then
forwards the user to a confirmation page.
Pretty straightforward, very similar to jsf tutorials.
However, once I added selectOneMenu items, I now find
myself having to submit the form twice before getting the
confirmation page.
The selectOneMenu items do have valueChangeListener
routines in the backing bean, because if I did not include
those, it would not return the value selected in the drop-down
boxes.
The form is submitted by a commandButton, which calls a
validate() routine in the backing bean, which returns null if
not validated or 'success' if validated, which should then
forward the browser to the confirm page.
I put System.out.println() messages in the valueChangeListener
as well as the validate() routine, and the first submit shows the
messages in valueChangeListener, the second shows the validate()
routine messages.
Maybe I'm missing something in the lifecycle order that may
cause this, but I have not been able to make it work right.
Has anyone come across this behavior in jsf ?
If anyone is interested, I can email a jar with the source,
xml (faces-config.xml, web.xml), and jsp files.
There seems no way to attach it in the forums.
I can, however, post snippets of how I code the drop-downs:
jsp file:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<td align="left">
<h:selectOneMenu value="#{data.state}"
valueChangeListener="#{data.stateSelected}">
<f:selectItems value="#{data.statelist}"/>
</h:selectOneMenu>
</td>
java source:
(drop-downs populate fine......)
public Collection getStatelist(){
//System.out.println(getLogtime() + "DataBean: getStates()");
if (sdata==null)
try{
populateStates();
} catch(SQLException sqlEx) {
logger.log(Level.SEVERE, "loginAction", sqlEx);
} catch(NamingException nameEx) {
logger.log(Level.SEVERE, "loginAction", nameEx);
} catch(Exception Ex) {
System.out.println(getLogtime() + "DataBean: getStates() Exception!");
//System.out.println(" nbr of state records: [" + sdata.size() + "]");
System.out.println(" msg: [" + Ex.getMessage() + "]");
//return sdata;
//System.out.println(getLogtime() + "DataBean: nbr of State records: [" + sdata.size() + "]");
return sdata;
public void populateStates()
throws SQLException, NamingException
//System.out.println("DataBean: populateStates()...");
//ctx = new InitialContext();
ctx = new InitialContext(System.getProperties());
if(ctx==null){
throw new NamingException("DataBean: No initial context");
ds = (DataSource)ctx.lookup("java:/comp/env/jdbc/testdataDS");
if(ds==null){
System.out.println("DataBean: no data source!!");
throw new NamingException("No data source");
//System.out.println("DataBean: getConnection...");
try {
conn = ds.getConnection();
if(conn==null) {
System.out.println("DataBean: no connection!!");
throw new SQLException("DataBean: No database connection");
} else {
PreparedStatement dataQuery = conn.prepareStatement(
"SELECT state_code, state_name FROM state ORDER BY state_code");
ResultSet result = dataQuery.executeQuery();
sdata = new ArrayList();
sdata.add(new SelectItem(" ","Please select one"));
if(!result.next()){
return;
} else {
sdata.add(new SelectItem(result.getString("state_code")
,result.getString("state_name")));
while(result.next()){
sdata.add(new SelectItem(result.getString("state_code")
,result.getString("state_name")));
} catch(SQLException se){
System.out.println("DataBean: populateStates() - connection/statement/execute : ");
System.out.println(" message: [" + se.getMessage() + "]");
//se.printStackTrace();
// look at the warnings issued it should help you resolve the problem
SQLWarning warning = null;
try {
// Get SQL warnings issued
//warning = conget.getWarnings();
warning = (SQLWarning)se.getNextException();
if (warning == null) {
System.out.println("DataBean: populateStates()could not get sql warnings");
} else {
//while (warning != null) {
System.out.println("DataBean populateStates() - Warning: " + warning);
//warning = warning.getNextWarning();
// warning = (SQLWarning)se.getNextException();
} catch (Exception we) {
System.out.println("DataBean populateStates() - SQLException !!");
System.out.println(" msg: [" + we.getMessage() + "]");
sdata = new ArrayList();
} catch (Exception e) {
System.out.println("DataBean: populateStates() lookup exception:");
System.out.println(" msg: [" + e.getMessage() + "]");
e.printStackTrace();
sdata = new ArrayList();
} finally {
conn.close();
faces-config.xml:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE faces-config PUBLIC
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
<application>
<locale-config>
<default-locale>en</default-locale>
<supported-locale>en</supported-locale>
<supported-locale>en_US</supported-locale>
<!-- supported-locale>de</supported-locale -->
</locale-config>
<!-- message-bundle>
de.laliluna.tutorial.messageresource.MessageResources
</message-bundle -->
</application>
<!-- managed beans of the simple hello world app -->
<managed-bean>
<managed-bean-name>data</managed-bean-name>
<managed-bean-class>edu.msu.hit.data.DataBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<!-- Navigation rules -->
<navigation-rule>
<description>Test select one page</description>
<from-view-id>/testSelectOnePage.jsp</from-view-id>
<!-- navigation-case>
<from-outcome>ticketsfailure</from-outcome>
<to-view-id>/ticketsonline.jsp</to-view-id>
</navigation-case -->
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/testSelectOneConfirm.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
web.xml:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>MyFaces Demo</display-name>
<description>a Myfaces demo page</description>
<!-- Listener, that does all the startup work (configuration, init). -->
<!-- listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener -->
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<resource-ref>
<description>Sybase Datasource resource</description>
<res-ref-name>jdbc/testdataDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>false</param-value>
<description>
Set this flag to true if you want the JavaServer Faces
Reference Implementation to validate the XML in your
faces-config.xml resources against the DTD. Default
value is false.
</description>
</context-param>
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/WEB-INF/log4j.properties</param-value>
</context-param>
<!-- context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>
/WEB-INF/faces-config.xml
</param-value>
<description>
Comma separated list of URIs of (additional) faces config files.
(e.g. /WEB-INF/my-config.xml)
See JSF 1.0 PRD2, 10.3.2
</description>
</context-param -->
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
<description>
State saving method: "client" or "server" (= default)
See JSF Specification 2.5.2
</description>
</context-param>
<context-param>
<param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
<param-value>true</param-value>
<description>
This parameter tells MyFaces if javascript code should be allowed in the
rendered HTML output.
If javascript is allowed, command_link anchors will have javascript code
that submits the corresponding form.
If javascript is not allowed, the state saving info and nested parameters
will be added as url parameters.
Default: "true"
</description>
</context-param>
<context-param>
<param-name>org.apache.myfaces.PRETTY_HTML</param-name>
<param-value>true</param-value>
<description>
If true, rendered HTML code will be formatted, so that it is "human readable".
i.e. additional line separators and whitespace will be written, that do not
influence the HTML code.
Default: "true"
</description>
</context-param>
<context-param>
<param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
<param-value>true</param-value>
<description>
If true, a javascript function will be rendered that is able to restore the
former vertical scroll on every request. Convenient feature if you have pages
with long lists and you do not want the browser page to always jump to the top
if you trigger a link or button action that stays on the same page.
Default: "false"
</description>
</context-param>
<!-- the following context-params are for jsf 1.1 -->
<!-- tjc 2007-02-07 -->
<context-param>
<param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
<param-value>org.apache.myfaces.renderkit.html.util.DefaultAddResource</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.redirectTracker.POLICY</param-name>
<param-value>org.apache.myfaces.redirectTracker.NoopRedirectTrackPolicy</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.redirectTracker.MAX_REDIRECTS</param-name>
<param-value>20</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.COMPRESS_STATE_IN_SESSION</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
<param-value>false</param-value>
</context-param>
</web-app>I'm running jsf 1.1, tomcat v5.5.20, apache 2.059, JK 1.2.18
Thanks to anyone for insight.Hello. Me again.
I did not post the JSP file that was using the above code, so I
decided to post it, and mention that if I use:
onchange="submit();"within the <h:selectOneMenu> tag, the form does not need to be
submitted twice, but takes the values and validates them.
On the other hand, if your form is long enough, and you have to scroll
down to change the drop-down box, the form is submitted, and
so it takes you to the top of the page again.
I guess that I could design the page so that the entire form fits
within the browser without scrolling, but that would depend on
how big the user makes their browser window.
Anyway, here is the JSP:
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<f:view>
<%
* MOCF ball tickets order form.
%>
<jsp:include page="./headerform.jsp">
<jsp:param name="pagetitle" value="MOCF Ball Tickets Purchase Page" />
<jsp:param name="page" value="tickets" />
</jsp:include>
<center>
<h:form>
<table border="2" cellspacing=1 cellpadding=2>
<tr>
<td align=center>
<h:outputText value="#{mocfBall.mocfyear}"/>
<h:outputText value="#{mocfBall.mocftitle}"/><br>
<b><i>
<h:outputText value="#{mocfBall.mocfslogan}"/>
</i></b><br>
<h:outputText value="#{mocfBall.mocflocation}"/><br>
<h:outputText value="#{mocfBall.mocfcity}"/><br>
<h:outputText value="#{mocfBall.mocfdate}"/><br>
</td>
</tr>
</table>
<table border="0" cellspacing=1 cellpadding=2 width="90%">
<tr>
<td align=center>
MOCF Ball Tickets PURCHASE FORM
</td>
</tr>
<tr>
<td align=center>
Date/Time:
<h:outputText value="#{mocfBall.currentdatetime}"/>
</td>
</tr>
<!-- tr>
<td align=center>
<a href="./ticketsprint.jsp">
LINK to PRINTABLE FORM<br>
(You can click here, then print the page,<br>
and send it in the mail with your check.)
</a>
</td>
</tr -->
<tr>
<td align=center>
<font size="2" face="arial">
You may print this form and fill in the fields by hand,
<br>or<br>
fill in the fields now by typing, then print the form with the
PRINT button in the browser menu above, or the "Print Page"
button below.
<br><br>
For questions, please contact:<br>
<h:outputText value="#{mocfBall.mocfcontactname}"/>
at
<h:outputText value="#{mocfBall.mocfcontactphone}"/>
or by email at
<h:outputText value="#{mocfBall.mocfcontactemail}"/>
<br><br>
To use the postal service instead of online submission,
please mail this form, with your check, to:<br>
<h:outputText value="#{mocfBall.mocfsnailtitle}"/><br>
<h:outputText value="#{mocfBall.mocfsnailaddr1}"/><br>
<h:outputText value="#{mocfBall.mocfsnailaddr2}"/><br>
<h:outputText value="#{mocfBall.mocfsnailaddr3}"/><br>
</font>
</td>
</tr>
<tr>
<td align=right>
<a href=<h:outputText value="#{mocfBall.mocfhome}"/>>MOCF Ball Home</a>
</td>
</tr>
</table>
<table width="90%" border="1" cellpadding="2" cellspacing="0">
<tr>
<td width="100%" valign="top" colspan="2" align="center">
(* = field required)
</td>
</tr>
<tr>
<td align="right" valign="top">
*Salutation:
</td>
<td align="left" valign="top">
<h:selectOneMenu id="formSalutations"
valueChangeListener="#{ticketsformBean.mocfsalutationSelected}"
value="${ticketsformBean.mocfsalutation}">
<f:selectItems value="#{ticketsformBean.allsalutations}"/>
</h:selectOneMenu>
<font class="formerror">
<br>
<h:outputText value="#{ticketsformBean.salutationerror}"/>
</font>
</td>
</tr>
<tr>
<td align="right" valign="top">
*First name:
</td>
<td align="left" valign="top">
<h:inputText value="#{ticketsformBean.mocffirstname}" size="40"/>
<font class="formerror">
<br>
<h:outputText value="#{ticketsformBean.firstnameerror}"/>
</font>
</td>
</tr>
<tr>
<td align="right" valign="top">
*Last name:
</td>
<td align="left" valign="top">
<h:inputText value="#{ticketsformBean.mocflastname}" size="40"/>
<font class="formerror">
<br>
<h:outputText value="#{ticketsformBean.lastnameerror}"/>
</font>
</td>
</tr>
<tr>
<td align="right" valign="top">
*Address1:
</td>
<td align="left" valign="top">
<h:inputText value="#{ticketsformBean.mocfaddress1}" size="40"/>
<font class="formerror">
<br>
<h:outputText value="#{ticketsformBean.address1error}"/>
</font>
</td>
</tr>
<tr>
<td align="right" valign="top">
*Address2:
</td>
<td align="left" valign="top">
<h:inputText value="#{ticketsformBean.mocfaddress2}" size="40"/>
<font class="formerror">
<br>
<h:outputText value="#{ticketsformBean.address2error}"/>
</font>
</td>
</tr>
<tr>
<td align="right" valign="top">
*City:
</td>
<td align="left" valign="top">
<h:inputText value="#{ticketsformBean.mocfcity}" size="30"/>
<font size="-2px" color="red">
<br>
<h:outputText value="#{ticketsformBean.cityerror}"/>
</font>
</td>
</tr>
<tr>
<td align="right" valign="top">
*State:
</td>
<td align="left" valign="top">
<h:selectOneMenu id="states"
valueChangeListener="#{ticketsformBean.mocfstateSelected}"
value="${ticketsformBean.mocfstate}">
<f:selectItems value="#{ticketsformBean.allstates}"/>
</h:selectOneMenu>
<font class="formerror">
<br>
<h:outputText value="#{ticketsformBean.stateerror}"/>
</font>
</td>
</tr>
<tr>
<td align="right" valign="top">
*Zip:
</td>
<td align="left" valign="top">
<h:inputText value="#{ticketsformBean.mocfzip}" size="10"/>
<font class="formerror">
<br>
<h:outputText value="#{ticketsformBean.ziperror}"/>
</font>
</td>
</tr>
<tr>
<td align="right" valign="top">
*Phone:
</td>
<td align="left" valign="top">
<h:inputText value="#{ticketsformBean.mocfphone}" size="10"/>
<font class="formerror">
<br>
<h:outputText value="#{ticketsformBean.phoneerror}"/>
</font>
</td>
</tr>
<tr>
<td align="right" valign="top">
Fax:
</td>
<td align="left" valign="top">
<h:inputText value="#{ticketsformBean.mocffax}" size="10"/>
<font class="formerror">
<br>
<h:outputText value="#{ticketsformBean.faxerror}"/>
</font>
</td>
</tr>
<tr>
<td align="right" valign="top">
*Email:
</td>
<td align="left" valign="top">
<h:inputText value="#{ticketsformBean.mocfemail}" size="60"/>
<font class="formerror">
<br>
<h:outputText value="#{ticketsformBean.emailerror}"/>
</font>
</td>
</tr>
</table>
<table width="90%" border="1" cellpadding="2" cellspacing="0">
<tr>
<td align="right" valign="top">
*Number of tickets to reserve:
</td>
<td align="left" valign="top">
<h:selectOneMenu id="ticketcount"
valueChangeListener="#{ticketsformBean.mocfnbrofticketsSelected}"
value="${ticketsformBean.mocfnbroftickets}">
<f:selectItems value="#{ticketsformBean.allticketcounts}"/>
</h:selectOneMenu>
<font class="formerror">
<br>
<h:outputText value="#{ticketsformBean.nbrticketserror}"/>
</font>
</td>
</tr>
<tr>
<td align="right" valign="top">
*Name1:
</td>
<td align="left" valign="top">
<h:inputText value="#{ticketsformBean.mocfname1}" size="30"/>
<font class="formerror">
<br>
<h:outputText value="#{ticketsformBean.name1error}"/>
</font>
</td>
</tr>
<tr>
<td align="right" valign="top">
*Name2:
</td>
<td align="left" valign="top">
<h:inputText value="#{ticketsformBean.mocfname2}" size="30"/>
<font class="formerror">
<br>
<h:outputText value="#{ticketsformBean.name2error}"/>
</font>
</td>
</tr>
<tr>
<td align="right" valign="top">
*Name3:
</td>
<td align="left" valign="top">
<h:inputText value="#{ticketsformBean.mocfname3}" size="30"/>
<font class="formerror">
<br>
<h:outputText value="#{ticketsformBean.name3error}"/>
</font>
</td>
</tr>
<tr>
<td align="right" valign="top">
*Name4:
</td>
<td align="left" valign="top">
<h:inputText value="#{ticketsformBean.mocfname4}" size="30"/>
<font class="formerror">
<br>
<h:outputText value="#{ticketsformBean.name4error}"/>
</font>
</td>
</tr>
<tr>
<td align="center" valign="top" colspan="2">
<h:commandButton value="Submit tickets order"
action="#{ticketsformBean.validate}"/>
</td>
</tr>
</table>
</h:form>
<br>
<table border="0" cellspacing=1 cellpadding=2>
<tr>
<td align=center>
<input type="hidden" name="form" value="print">
<INPUT TYPE="button" name="printMe" onClick="print()" value="Print Page">
</td>
</tr>
</table>
</center>
<h:messages />
<jsp:include page="./footerform.jsp" />
</f:view> -
Snippets Problem: HTML ID changes when pasted twice or more
Hi there,
I have an external CSS style sheet in a website that formats elements in a snippet. However, when I paste a snippet more than once, the ID field receives a number. For example, the first snippet will post with an element as <td id="Title">, while the second paste will cause it to be <td id="Title2">. The CSS sheet only knows to format elements with the ID "Title" so when I paste this more than once the ID changes.
Under normal circumstances, I would just edit the HTML code, however, the site is meant to be heavily template driven, and the second person managing it doesn't have time to edit/learn HTML code as they are busy with other tasks. For the moment, PHP/MySQL isn't an option either.
Is there a way to have pasted elements not include an additional number in the ID fields?
Thanks,
DavidYou can't technically use the same HTML id twice.
<div id="edgar"></div>
<div id="edgar"></div>
Is a no-no.
Use classes instead...
<div class="edgar"></div>
<div class="edgar"></div>
Your css would go from
#edgar {
some attributes
to
.edgar {
some attributes
EDIT: Or in your case <td id="Title"> to <td class="Title"> and in the CSS #Title to .Title -
Working with HTTP-POST Submit Button
I've created a form that uses a submit button with HTTP-POST. I've tested this against a script that displays the fields, however, I'd like to table the posted data to SQL. Can someone show me some code to parse this data with CGI, or PHP?
Yes. At some point you will need to prarse the requests and treat them differently - because a POST is NOT the same as a GET.
Anyway, just place the variables or script-links to the variables in an HTML Form.
Very easy stuff. -
Two submit buttons or more going to diffrent e-mails
Hello!
This question was from ndjustin20 and was answered on October 7, 2009 by pgueret below, however I an not javascript (i am assuming it was used) savvy and cannot figure out how it is done. Does anyone have the text used?
I am trying to create (many) submit buttons to different e-mails.
Hello Everyone!
I'm trying to have two separate buttons inside my form that simply email my pdf to two different addresses. For some reason though the first button I create and enter an email address for takes presedence over all the rest of the buttons I create. So I create button1 with email address [email protected] then i create another button2 and say that has an email address of [email protected] well what is happening is no matter what i put in button2's properties or inside the XML it still puts [email protected] in the to line of the email. I am using the button object and changing it to a submit with the PDF option selected from the drop down. I have been able to do this in the past but since i have upgraded to Lifecycle 8.2 I can no longer get it to work right. Any help is appreciated. I don't know how to code in lifecyle but I do understand the principles of programming so if it is something that i need to do "under the hood" so to speak then please give me that option also.
I am also receiving this warning:
"This document has accessed more than one site and may be trying to share data among different locations. This could be a privacy concern. Are you sure you want to continue?"
I have attached the form for further review.
JHello pguerett,
I read the advice you gave to ndjustin20 and I was wondering if you could help me out with the same issue with having two submit buttons going to two different email addresses. I try following along with what you were saying, but was getting confused on how you were going about to fix the warning i am receiving about “"This document has accessed more than one site and may be trying to share data among different locations. This could be a privacy concern. Are you sure you want to continue?”.
I’m new to adobe’s discussion board and new to LiveCycle Designer and I’m not too diverse in java scripting. I used the “Email submit button” option in the library palette to add the buttons to my form for whoever is filling out the form to e-mail them back to one of the two email addresses.
I am attaching the form for your review. Anything you can help me with on this will be greatly appreciated. Thanks!
Rene -
Error in http post submit in Acrobat 8 and Reader 8
I am having an error when using the submit button via http post in Adobe 8 and Reader 8.
The http post is not properly formed and only submits the name of the first field and all of the values of the form. All the remaining fields names are not submitted.
It works fine however if I use Adobe 7 or Reader 7.
Anyone else have this error.
QuintenI have the same problem with Reader 8. It's a bug. In http request ampersand is missing. Reaser 8 sends:
PAR1=value_of_par1PAR2=value_of_par2PAR3=value_of_par3
but it may be:
PAR1=value_of_par1&PAR2=value_of_par2&PAR3=value_of_par3
Michal
Maybe you are looking for
-
How can we read the screen field values from the report selection screen wi
Hi expart, How can we read the screen field values from the report selection screen with out having an ENTER button pressed . Regards Razz
-
Hi all, Can somebody say which is the correct data source for MTTR/MTBR. I'm trying to use 2LIS_17_I0NOTIF. But it doesn't have fields for start & end date, time of malfunction. But these fields are mapped in standard infosource 2LIS_17_NOTIF. With r
-
ITunes Downloads Keep Starting Over
Oftentimes, when a download of mine gets interrupted due to my unstable Internet connection, iTunes frequently chooses to start over completely instead of picking up where it left off. As a result, I'm forced to waste several gigabytes of Apple's ban
-
Tips! How to bypass new crop tool CS6, photoshop
Do you dislike the new crop function in Photoshop CS6? I found out a way to handle and bypass the function so it works like in earlier versions. 1. First step is to change to classic mode (this is done in settings above the image a little "gear") 2.
-
Problem with JDBC driver for mysql
I have downloaded the Connector/J3.0 mysql-connector-java-3.0.7-stable.tar.gz from www.mysql.com/downloads/api-jdbc-stable.html web site and used gunzip and tar to extract the file. I have received the following error message: tar: directory checksum