struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gagné Jean-Christian <Jean-Christian.Ga...@ne.ch>
Subject RE: [SPAM] - RE: <html:link> instead of <html:submit> - Bayesian Filter detected spam
Date Fri, 13 Feb 2004 10:48:13 GMT
Works well with this javascript. Sorry for the french content...

/* Déclancher un submit depuis un lien */
function submitForm(aFormName, aSubmitValue) {
  var vForm = document.forms[aFormName];
  if (vForm == null) {
      alert("La page ne contient pas de formulaire nommé '" + aFormName +
"'");
  }

  var vElement = vForm.elements["submitValue"];
  if (vElement == null) {
      alert("Le formulaire '" + aFormName + "' ne contient pas le champs
'submitValue'");
  }
  else {
	vElement.value = aSubmitValue;
      return vForm.submit();
  }
}


In your jsp, this link will set the dispatch value in the form and submit
it...

<a href="javascript:submitForm('MyForm', 'MyDispatch')">Click here to
submit</a>

NOTE: Your form MUST have a hidden field named "submitValue" (or "dispatch"
or whatever...just be in sync with the script)


JCG


> -----Message d'origine-----
> De : Paul McCulloch [mailto:paul.mcculloch@axiossystems.com]
> Envoyé : vendredi 13 février 2004 11:36
> À : 'Struts Users Mailing List'
> Objet : [SPAM] - RE: <html:link> instead of <html:submit> - Bayesian
> Filter detected spam
> 
> 
> I don't beleve this will submit the values in the form's 
> input fields. I've
> achieved this functionality by having links which use 
> javascript to set the
> dispatch form value & call submit.
> 
> Paul
> 
> > -----Original Message-----
> > From: Gopalakrishnan, Jayesh 
> [mailto:Jayesh.Gopalakrishnan@schwab.com]
> > Sent: 12 February 2004 19:45
> > To: Struts Users Mailing List
> > Subject: RE: <html:link> instead of <html:submit>
> > 
> > 
> > Wouldn't query parameters work here?
> > 
> > How abt using <html:link page="/youraction?buttonName=testButton" />
> > 
> > 
> > HTH..
> > 
> > -jayash
> > 
> > 
> > 
> > -----Original Message-----
> > From: Dieter Mummenschanz [mailto:dmummenschanz@gmx.net]
> > Sent: Thursday, February 12, 2004 12:46 PM
> > To: struts-user@jakarta.apache.org
> > Subject: <html:link> instead of <html:submit>
> > 
> > 
> > Hello,
> > 
> > I have a jsp page with some <html:submit> buttons. The 
> > servlet identifies
> > the klicked button by invoking 
> httpservletrequest.getParameter("...").
> > Is there a way to use links in my .jsp page using <html:link> 
> > instead of
> > <html:submit>?
> > 
> > Thx for any help,
> > Dieter
> > 
> > -- 
> > GMX ProMail (250 MB Mailbox, 50 FreeSMS, Virenschutz, 2,99 
> > EUR/Monat...)
> > jetzt 3 Monate GRATIS + 3x DER SPIEGEL +++ 
> http://www.gmx.net/derspiegel +++
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 
> **************************************
> Axios Email Confidentiality Footer
> Privileged/Confidential Information may be contained in this 
> message. If you are not the addressee indicated in this 
> message (or responsible for delivery of the message to such 
> person), you may not copy or deliver this message to anyone. 
> In such case, you should destroy this message, and notify us 
> immediately. If you or your employer does not consent to 
> Internet email messages of this kind, please advise us 
> immediately. Opinions, conclusions and other information 
> expressed in this message are not given or endorsed by my 
> Company or employer unless otherwise indicated by an 
> authorised representative independent of this message.
> WARNING:
> While Axios Systems Ltd takes steps to prevent computer 
> viruses from being transmitted via electronic mail 
> attachments we cannot guarantee that attachments do not 
> contain computer virus code.  You are therefore strongly 
> advised to undertake anti virus checks prior to accessing the 
> attachment to this electronic mail.  Axios Systems Ltd grants 
> no warranties regarding performance use or quality of any 
> attachment and undertakes no liability for loss or damage 
> howsoever caused.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message