Hello all together,

I'm heaving problems with form-submitting in IE6 since updating from 
prototype 1.5.1 to 1.6.0.

It's all about a PM-Service in a community portal.

I have a form containing only checkboxes. The user can select these and 
click a link. This link has a onclick-event (inline-HTML) that executes 
a function.

This function includes code similar to:

 > var doFormAction_confirmDialog = new ConfirmDialog();/
 > doFormAction_confirmDialog.title = 'title';
 > doFormAction_confirmDialog.bodytext = 'do you want?';
 > doFormAction_confirmDialog.label_yes = 'yes';
 > doFormAction_confirmDialog.label_no = 'no';
 > doFormAction_confirmDialog.onYes = function(event) {
 >      $(formId).submit();
 >      return false;
 > };
 > doFormAction_confirmDialog.show();

And here is the code for my confirm-dialog. It was originally based on 
the lightbox code. So it's quiet similar:

> /*
>  * Dialog YES/NO
>  */
> //var ConfirmDialog = new Object ();
> ConfirmDialog.prototype = {
>       result: false,
>       show: function() {},
>       
>       close: function(event) {
>               Element.remove($('lbContent'));
>               
>               if (Prototype.Browser.IE){
>                       this.setScroll(0,this.yPos);
>                       this.prepareIE("auto", "auto");
>                       this.hideSelects("visible");
>               }
>               $('overlay').style.display = 'none';
>               $('lightbox').style.display = 'none';
>       },
>       
>       activate: function(dialogClassName){
>               var dialog = $$("." + dialogClassName).first().cloneNode(true);
> 
>               if (Prototype.Browser.IE) {
>                       this.getScroll();
>                       this.prepareIE('100%', 'hidden');
>                       this.setScroll(0,0);
>                       this.hideSelects('hidden');
>               }
>               $('overlay').style.display = 'block';
>               $('lightbox').style.display = 'block';
>               //make sure there is a lbContent DIV
>               info = document.createElement('div');
>               info.appendChild(dialog);
>               new Insertion.Before($('lbLoadMessage'), '<div id="lbContent">' 
> + info.innerHTML + '</div>');
>               $('lightbox').className = "done";
>               
>               return $('lbContent').select("." + dialogClassName).first();
>       },
>       
>       getScroll: function(){
>               if (self.pageYOffset) {
>                       this.yPos = self.pageYOffset;
>               } else if (document.documentElement && 
> document.documentElement.scrollTop){
>                       this.yPos = document.documentElement.scrollTop;
>               } else if (document.body) {
>                       this.yPos = document.body.scrollTop;
>               }
>       },
>       
>       prepareIE: function(height, overflow){
>               bod = $$('body').first();
>               bod.style.height = height;
>               bod.style.overflow = overflow;
> 
>               htm = $$('html').first();
>               htm.style.height = height;
>               htm.style.overflow = overflow;
>       },
> 
>       setScroll: function(x, y){
>               window.scrollTo(x, y);
>       },
>       
>       hideSelects: function(visibility){
>               selects = $$('select');
>               for(i = 0; i < selects.length; i++) {
>                       selects[i].style.visibility = visibility;
>               }
>       },
>       title: String,
>       bodytext: String,
>       label_yes: String,
>       label_no: String,
>       
>       onYes: function() {},
>       onNo: function() {},
>       
>       show: function() {
>               var dialog = this.activate('global-modalDialog-yes_no');
>               dialog.select('.body h4').first().innerHTML = this.title;
>               dialog.select('.body p').first().innerHTML = this.bodytext;
>               
>               var btn_yes = dialog.select('.foot .action-list-primary 
> a').first();
>               btn_yes.innerHTML = this.label_yes;
>               btn_yes.observe('click', this.onYes);
>               btn_yes.observe('click', function(event) {
>                       this.result = true;
>                       this.close(event);
>               }.bindAsEventListener(this));
>               
>               var btn_no = dialog.select('.foot .action-list-secondary 
> a').first();
>               btn_no.innerHTML = this.label_no;
>               btn_no.observe('click', this.onNo);
>               btn_no.observe('click', function(event) {
>                       this.result = false;
>                       this.close(event);
>               }.bindAsEventListener(this));
>       }
> }
> function ConfirmDialog () {}




This all works perfectly in IE6, IE7 and Firefox when I include the 
prototype-1.5.1.js. But using prototype-1.6.0.2, I have the following 
problem in IE6:

When I click "yes" inside my dialog, "sometimes" the browser does 
nothing and sometimes it submits the form but the page is not reloaded. 
This is really strange behaviour.

I commented out all the other javascript files in my application. But 
the problem is still there and I have no further clue?

Does anyone here has a clue?

Thanks

Frederic

-- 
Frederic Gaus                                 pgp-key: 93E6903C
fingerprint: 0C55 4517 CC1E 5F7F 9059  3535 AB54 D8E8 93E6 903C

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to