This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes problem with submit and redirection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "problem with submit and redirection" Watch "problem with submit and redirection" New topic
Author

problem with submit and redirection

abdel solarie
Greenhorn

Joined: Oct 29, 2010
Posts: 9
hi,
i developpet one application using struts , i have tested it with Firefox ad IE i works verry well but i have got problem with google chrome,
the problem is that : whene i click on one button i excpect that the rattched javascipt function submit first oen form then redirect me to another link, but under google chrome , the form isn't submitted (for Firefox and IE no problem)

the function
function cll()

{this.document.forms["myform"].submit();
var p=document.getElementById('myLink').href;
location.href =p;
}
problem with submit and redirection {javascipt struts under google chrome}
the form :

<form id="myform" action="urlt0.do" method="post">
<html:hidden name="urlt0" property="url_page_t0" value=""/>
</form>

the button
<td class="divleft"><div align="center" ><a id="myLink" href="/projet_web/search.do?ml=38&fpc=1000" >
<input type="hidden"/></a>
<input name="button" type="button" class="inputbutton" value="Recherche" onclick="cll()" />
 
Don't get me started about those stupid light bulbs.
 
subject: problem with submit and redirection
 
Similar Threads
submit then redirect to location.href
How to capture enter key?
problem with submit and redirection {javascipt struts under google chrome}
A javascript to submit a form works in Firefox, but not in IE
problem with submit and redirection {javascipt struts under google chrome}