yesno button with javascript event driving me nuts

Hey all,

I have an yesno element. I also have a display element.

I want the display element to be visible when the no button is active and i want to hide the display element when yes is active.

To accomplish that I tried to make javascript events.

I tried:

on load == 1 hide display_element
on load == 0 show display_element
on load !== 1 hide display_element
on load !== 0 show display element
on click == 1 hide display_element
On click == 0 show display_element

etc etc.. I also tried on change, select... and i also tried == yes or == no... and even in dutch i tried ==ja and ==nee

Plus all other combinations with !== , == etc

But, nothing happens to the display element. On another page i used this with a checkbox... and that is working very good.

So what am I missing? Or how can I use the javascript event with the yesno button??

Regards
 
No issue on my site (onload + change).

Did you try with other element types?
Do you have JS errors?
Which Joomla template (did you try standard Protostar)?
 
ordasoft base template

On other pages i used this with checkbox to show other checkboxes and a dropdown and thats working good

Is it possible the display element is causing this??
 
ok, strange, when i only press view details on frontend... i have no errors and the element is hidden.

But when i press edit the data.. i get some js errors, and the element is not hidden anymore.


Code:
no content option set for window.html

date-min.js:3 Uncaught TypeError: Calendar is not a constructor
    at Object.makeCalendar (date-min.js:3)
    at Object.e.extend.$owner (mootools-core.js?6c7a606625f1b748d24dc44e24fdde09:38)
    at Object.setUp (date-min.js:3)
    at Object.e.extend.$owner (mootools-core.js?6c7a606625f1b748d24dc44e24fdde09:38)
    at Object.initialize (date-min.js:3)
    at Object.<anonymous> (mootools-more.js?6c7a606625f1b748d24dc44e24fdde09:27)
    at Object.e.extend.$owner [as initialize] (mootools-core.js?6c7a606625f1b748d24dc44e24fdde09:38)
    at new <anonymous> (mootools-core.js?6c7a606625f1b748d24dc44e24fdde09:37)
    at Object.<anonymous> (form.js:3)
    at Array.forEach (<anonymous>)
makeCalendar @ date-min.js:3

window.js:3 Uncaught TypeError: Cannot read property 'apply' of undefined
    at Object.close (window.js:3)
    at Object.e.extend.$owner (mootools-core.js?6c7a606625f1b748d24dc44e24fdde09:38)
    at Object.<anonymous> (fileupload-min.js:3)
    at mootools-core.js?6c7a606625f1b748d24dc44e24fdde09:21
close @ window.js:3

Screenshot_114.png

I hope you can tell me what is wrong
 
window.js:3 Uncaught TypeError: Cannot read property 'apply' of undefined
at Object.close (window.js:3)
at Object.e.extend.$owner (mootools-core.js?6c7a606625f1b748d24dc44e24fdde09:38)
at Object.<anonymous> (fileupload-min.js:3)
at mootools-core.js?6c7a606625f1b748d24dc44e24fdde09:21
close @ window.js:3


Ok this error is caused by the file upload element, but i do not know why... any idea?

For the other error.. I noticed i had some joins, and one list did not have jdate but date plugin... so i changed it to jdate.. now the error changes.


Code:
date-min.js:3 Uncaught TypeError: Date.parseDate is not a function
    at Object.makeCalendar (date-min.js:3)
    at Object.e.extend.$owner (mootools-core.js?6c7a606625f1b748d24dc44e24fdde09:38)
    at Object.setUp (date-min.js:3)
    at Object.e.extend.$owner (mootools-core.js?6c7a606625f1b748d24dc44e24fdde09:38)
    at Object.initialize (date-min.js:3)
    at Object.<anonymous> (mootools-more.js?6c7a606625f1b748d24dc44e24fdde09:27)
    at Object.e.extend.$owner [as initialize] (mootools-core.js?6c7a606625f1b748d24dc44e24fdde09:38)
    at new <anonymous> (mootools-core.js?6c7a606625f1b748d24dc44e24fdde09:37)
    at Object.<anonymous> (form.js:3)
    at Array.forEach (<anonymous>)

any idea?
 
Last edited:
Ok this error is caused by the file upload element, but i do not know why... any idea?

For the other error.. I noticed i had some joins, and one list did not have jdate but date plugin... so i changed it to jdate.. now the error changes.


Code:
date-min.js:3 Uncaught TypeError: Date.parseDate is not a function
    at Object.makeCalendar (date-min.js:3)
    at Object.e.extend.$owner (mootools-core.js?6c7a606625f1b748d24dc44e24fdde09:38)
    at Object.setUp (date-min.js:3)
    at Object.e.extend.$owner (mootools-core.js?6c7a606625f1b748d24dc44e24fdde09:38)
    at Object.initialize (date-min.js:3)
    at Object.<anonymous> (mootools-more.js?6c7a606625f1b748d24dc44e24fdde09:27)
    at Object.e.extend.$owner [as initialize] (mootools-core.js?6c7a606625f1b748d24dc44e24fdde09:38)
    at new <anonymous> (mootools-core.js?6c7a606625f1b748d24dc44e24fdde09:37)
    at Object.<anonymous> (form.js:3)
    at Array.forEach (<anonymous>)

any idea?


When I manually changed form format into Y-m-d H:i:s the error is gone..

It was... Y-m-d by default.. strange.. but the date error is gone.

The other error is also gone now... its working.............

strange.. thanks for the help, but its strange jdate is writing the wrong date format what is causing this, since its a default something when creating a new list.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top