He creado un formulario web que incluye un campo de fecha con Date Popup. Al hacer clic en Date Popup el formulario automáticamente se envía en lugar de mostrar el calendario. Esto sucede en IE8 y en IE9. En Firefox no hay problema. Agradezco cualquier sugerencia para corregir este problema. Un saludo desde Guatemala.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jestrada2011’s picture

Assigned: jestrada2011 » Unassigned

He notado que la versión webform-7.x-3.11 no hay problema con IE. A partir de la versión webform-7.x-3.12 se da el problema.

Alguna idea?

Pueden responder en ingles, no hay problema, yo traduzco.

Saludos,

quicksketch’s picture

So the report in English run through Google translate:

I created a web form that includes a date field with Date Popup. When you click the Date Popup form is automatically sent instead of showing the calendar. This happens in IE8 and IE9. In Firefox no problem. I appreciate any suggestions to correct this problem. Greetings from Guatemala.

I noticed that the webform version 7.x-3.11-no problem with IE. From the webform version 7.x-3.12-is the problem.

May respond in English, no problem, I translate.

The source of the problem is probably that you are getting a JavaScript error on the page in IE8 and IE9. If there are any errors the JavaScript won't work and you'll get the problem you're describing.

jestrada2011’s picture

Thank you for responding quicksketch, at the moment work with version 7.x-3.11 that I have not had this problem in IE.

I have problems with versions 7.x-3.12 and 7.x-3.13, upon clicking the calendar popup button, the web form is sent, instead of showing the calendar window. This I have checked on IE8 and IE9 versions. In Firefox and Chrome is not given the problem.

Do not see any JavaScript error or something.

Much appreciate any suggestions you can give me to solve this problem. Best Regards.

rovi’s picture

Hello, i have the same problem. On IE8 appears the following error in webform.js (console is not defined at line 24). Any help will be very apreciated. Thanks

quicksketch’s picture

Title: Formulario se envía al hacer clic en Date Popup » Date Popup causes JavaScript error on IE8/9
Priority: Normal » Major

On IE8 appears the following error in webform.js (console is not defined at line 24).

Oh yikes! Looks like we have a line of debugging code in webform.js!

Line 24 of webform.js is this:

console.log(startDate);

The quick fix for this is just to remove that line. We should remove that line and get a new release out quickly, a blatant JavaScript error like that is going to cause all kinds of havoc. Thanks for the report guys.

Ari Gold’s picture

Note that the debugging is not only on line 24, but also 39 and 40.

This was also preventing jquery accordion from working on a page with webform block. Commenting out the debugging lines fixed it!

jestrada2011’s picture

Status: Active » Closed (fixed)

Thanks, by removing lines 24, 39 and 40 in the webform.js file corrects the problem in IE. Thanks for your help guys.

rovi’s picture

Now works, just remove the lines 24, 39 and 40, thanks to the great community

iwant2fly’s picture

This works great thanks for the translation and the fix.

acbramley’s picture

Thanks for that, here's a patch that does the job.

joelstein’s picture

Priority: Major » Critical
Status: Closed (fixed) » Reviewed & tested by the community

The issue was prematurely closed in #7 (above).

Removing these three lines from webform.js does the trick. Can we get this committed?

GiorgosK’s picture

please apply patch works as expected

quicksketch’s picture

Priority: Critical » Major
Status: Reviewed & tested by the community » Fixed

Thanks guys. Sorry I've been busy with lots of personal, work, and other contrib modules. Finally committed to the 7.x-3.x branch. 6.x-3.x was unaffected but I added the extra new-line to webform.js (per the patch in #10) in that branch too.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Gerard’s picture

Reopening. Same problem as #3 this time with version 7.3.15
Upon clicking the calendar popup button the web form is sent. I disabled several modules without effect. Can't exactly tell since when this happens. Can anyone reproduce this?

Gerard’s picture

Status: Closed (fixed) » Active
quicksketch’s picture

Upon clicking the calendar popup button the web form is sent. I disabled several modules without effect. Can't exactly tell since when this happens. Can anyone reproduce this?

I'm guessing that this may be a separate issue. Turn off JavaScript aggregation on your site and then check the error console in your browser for JavaScript errors. That should identify which JavaScript file is causing the problem.

Gerard’s picture

I disabled most modules and set the theme to Garland
Only on webform nodes I get this error, also on a webform without date popup.

Uncaught Syntax error, unrecognized expression:  
k.errorjquery.js:85
kjquery.js:82
t.querySelectorAll.kjquery.js:102
c.fn.extend.findjquery.js:105
b.fn.b.initjquery.js:26
bjquery.js:23
c.fn.extend.afterjquery.js:116
Drupal.behaviors.collapse.attachcollapse.js:82
b.extend.eachjquery.js:34
b.fn.b.eachjquery.js:27
$.fn.oncejquery.once.js:55
Drupal.behaviors.collapse.attachcollapse.js:58
Drupal.attachBehaviorsdrupal.js:55
b.extend.eachjquery.js:33
Drupal.attachBehaviorsdrupal.js:53
Drupal.theme.placeholderdrupal.js:391
b.extend.readyjquery.js:30
ujquery.js:38

Do you understand what's going wrong?

quicksketch’s picture

Looks like the error is coming from collapse.js, the core JS file for creating collapsible fieldsets. Do you have any collapsed fieldsets on the page?

I get this error, also on a webform without date popup.

If you would be so kind, please re-close this issue and open a new issue, describing it from the beginning. If it's not related to this old bug (which has been fixed) it should be a new issue.

Gerard’s picture

Status: Active » Closed (fixed)
Augusto182’s picture

Title: Date Popup causes JavaScript error on IE8/9 » Date Popup causes JavaScript error on IE8/9 and firefox
Status: Closed (fixed) » Active

Hello.

Reopening. Same problem as jestrada2011 but in firefox. More precisely, in a form loaded in overlay using the colorbox module.

The form is submited when i click on the popup buttom...

I dont know if this is a problem from Webform, o from Colorbox...

Thanks...

quicksketch’s picture

Title: Date Popup causes JavaScript error on IE8/9 and firefox » Date Popup causes JavaScript error on IE8/9
Status: Active » Closed (fixed)

This particular bug has been fixed already. Please open a new issue, as this problem was specific to IE.

rahulshah_1988’s picture

I commented those 3 lines. Still having the same problem. Do we need to do anything to apply the change or simply save the webform.js file and refresh the page on IE. I am using IE 9

rahulshah_1988’s picture

I commented those 3 lines. Still having the same problem. Do we need to do anything to apply the change or simply save the webform.js file and refresh the page on IE. I am using IE 9