>From a strict HTML perspective, the less you have in your form the
better the page performs.  From a few observations in debugging AJAX
functionality that doesn't work on past projects (not Wicket related),
you have to make sure that no Javascript exceptions are thrown at all.
Basically, IE will turn off its Javascript interpreter completely as
soon as the interpreter catches an exception.  If you don't catch it and
handle it in the page properly, no further Javascript will work until
the page is reloaded.

One example is from a tool that used to be available to enable multiple
versions of IE on your Windows machine.  It was a registry hack that
gave you the rendering engine for older versions of IE on your machine
(they are all there).  One of the side effects of using any rendering
engine that was not the current one (IE 7 at the time I ran into the
problem) was that you could not invoke the window.print() function.  If
that happened, the rendering engine threw an exception and killed all
future Javascript functions.  So the popup window we had with a "print"
and "close" button would not work properly if the user hit the "print"
button first.  The print button used "window.print()" and the close
button used "window.close()", so the Javascript was fairly simple.  As
soon as the exception was thrown, the close button ceased to work.  The
"multiple IE" hack was the cause here, but we saw it on some of our more
complex forms as well.

When Javascript stops working on IE, no further Javascript calls will
work.  Just to make sure you haven't run into this problem, add a simple
little button or link that has the javascript action "alert('still
works')" to your page.  Once you get to the place where the page
reproducibly does not work, click on that button.  If the little alert
dialog box does not open up, then IE's Javascript engine has completely
crapped out.  My guess is that this is what you are running into,
without actually seeing anything.

-----Original Message-----
From: Martin Dietze [mailto:d...@fh-wedel.de] 
Sent: Wednesday, December 16, 2009 8:42 AM
To: users@wicket.apache.org
Subject: onSubmit() not entered (IE6 and IE7)

I have repeatedly run into situations like this one:

On very complex pages with lots of Ajax-stuff I sometimes get to
a point where (reproducably) my form's onSubmit() method is
never entered when submitting the form with a simple submit
button. This problem occurs in IE6 and IE7. 

Usually as a workaround I ended up with one of these solutions
(putting the one I like better first):

 (1) attaching the 'onSubmit()' method to the button rather than
     the form

 (2) making the button an AjaxButton with default form submit
     behaviour set to 'true'

The first from these solutions does not work in some solutions,
so that I have to switch to the second one.

In a particular case I had today the submit button which did not
work with IE6 and IE7 was supposed to perform an upload. Due to
some issues still not resolved in wicket 1.4.3 I am currently
unable to use Ajax for uploads in my project. So I ended up with
a third workaround:

 (3) moved the upload stuff to a separate form on the page

Solution (3) now works, but it is not nice, since due to the
page's layout there's no way to place the upload somewhere where
it looks nice.

Unfortunately there's no reliable way to produce this kind of
problem, at some place you'll 'just have it'. And since it
happens in complex pages it is not really possible for me to
provide example code here (commercial project, you know the
story).

Now first of all I would like to hear some comments - anyone
else experienced similar problems? 
Also, as we may (almost) all agree that IE6 (and probably later
versions as well) is brain damaged software that should be
forbidden, it is still in use and needs to be suported. Thus:
is there any chance we can track down problems like this and
fix them within wicket?

Cheers,

M'bert

-- 
----------- / http://herbert.the-little-red-haired-girl.org /
-------------
=+= 
Immer Schwierigkeiten immer gerade so zu schaffen, und so macht man sich
auf
Dauer halt zum Schwierigkeitenaffen, trifft befreundete Primaten in den
Kneipen
und im Garten, wartend auf die grosse Sause oder einfach nur oder besser
noch,
die grosse Pause.  -- Die Sterne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to