[ 
https://issues.apache.org/jira/browse/WICKET-2214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12848603#action_12848603
 ] 

Farhan commented on WICKET-2214:
--------------------------------

I am getting a scripting error in IE when using YUI DatePicker. The DatePicker 
is part of a form contained within a panel, and the panel is rendered in a 
modal-window. As suggested by Matej/Gabriel, (and as per the ModalWindow 
javadocs) I added the modal-window itself in another wicket form. Now that does 
resolve the DatePicker scripting-error, but my form within the panel is no 
longer working as expected. 

Strangely, enclosing the modal-window in another form results in the form tag 
(within the panel) getting replaced by a <div> tag in the resulting page, with 
onSubmit() event attached to it, which is weird, and hence the Submit button 
reacts to the (default) form part of the modal window implementation, which is 
the very parent form in the hierarchy.

Below is the <div> tag with the onsubmit event which i am referring to above, 
which really should be a <form> tag, as it was before i tried the solution.

<div id="id269" onsubmit="var wcall=wicketSubmitFormById('id269', 
'?x=l*F2Z-vvlsgtuteLhpGYqUP-p0Prju6WvbPKvK5rCXmocNnl4xgDlMC2oiv7jeApNIdJJUpaJoLpF10SUaMz1QALvs4BdU5NUjwPEIYl0WlBchN86VEYhYQ0N5EbaYaPgRY*F0cYbevfcrN2TJfXJMi4phSfh59YXU5VUWXtZhvdFoEfo0KksqlpIxqO6U*8',
 null,null,null, function() {return 
Wicket.$$(this)&amp;&amp;Wicket.$$('id269')}.bind(this));return false;;">




> Form tag in ModalWindow html code causes nested html forms when ModalWindow 
> is used with panel that contain forms
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2214
>                 URL: https://issues.apache.org/jira/browse/WICKET-2214
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.3.5, 1.3.6, 1.4-RC2
>            Reporter: Jor
>            Assignee: Matej Knopp
>         Attachments: modal.js.patch
>
>
> There is an extra form tag in modal window html code (modal.js -> 
> Wicket.Window.getMarkup function), it causes problems when ModalWindow is 
> used with panel that contain forms. 
> I haven't found any use for that form tag as it cannot be referenced from 
> java code (it has no wicket id) and it only causes problems by creating 
> nested form tags (outter form from modal html with no wicket id and inner 
> form from panel with wicket id) that some browsers cant handle and its 
> againts W3C html specification.
> I had to replace it with div tag to get my panel working.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to