This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JavaScript form submit fails in IE7, works in FF and Safari

 
Darth Heizenberg
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a test JSF page that I've created with the following piece of code:



The 'scratch' bean points to a class I wrote, that implements java.util.Map and uses a HashMap under the covers. I have system.out's in the get and put methods of this backing bean. I'm using RichFaces 1.2 that's bundled with JBoss 4.2.0GA along with facelets, although this page has no facelets code.
On clicking submit, I find that the put(dummy, +value+) is being called, and the rendering of the page always calls get('dummy'). This happens only in Firefox and Safari, and the text box after the submit contains the value I just set it to. On IE7 however, I only see get('dummy') being called and put is never invoked. Predictably, the text box is empty when the page returns (instead of populated with the value I just entered as it does in Firefox and Safari.

Any ideas why?

Just FYI, I've added the original problem I'm trying to solve, in the previous post.

Thanks,
Ananda
[ May 06, 2008: Message edited by: Darth Heizenberg ]
 
Dylan Honorez
Ranch Hand
Posts: 30
AngularJS Mac OS X Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no clue why it works in FireFox and Opera, I do have a clue what could be wrong:



should be something like



Or is that just the RichFaces way?
 
Darth Heizenberg
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From what I understand, you could do either one.
Using action="#{bean.methodExpr}" simply submits, then calls the method on the bean, which returns a String specifing what page to forward to.
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Darth Heizenberg",

Welcome to the JavaRanch.

We're a friendly group, but we do require members to have valid display names.

Display names must be two words: your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and correct your display name since accounts with invalid display names get deleted.
 
Paul Michael
Ranch Hand
Posts: 697
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also encountered this problem in IE7. I tried typing in a textfield and then pressed the ENTER button (which does not nothing in IE).

I tested the same procedure with Firefox and the request got submitted.

I'm using MyFaces 1.1.5. I haven't really investigated the problem as it does not bother me that much as of the moment. (I can always click the Submit button explicitly)

Anyway, please keep us posted with your experiments.

Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic