Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

element.attachEvent is not a function
 
NaveenRahul
Jr. Member
 
Total Posts:  26
Joined:  2010-05-12
 

Hi ALL

when you guys added the new custom js and receving the below bug

element.attachEvent is not a function

open magento/app/design/frontend/default/your-theme/layout/page.xml

the answer is so simple, i received the bug when i added new custom js for my own created module, and it all recived the bug when ever i refresh the page and disturbed the whole magento system.

i removed all the my custom created js and pasted in the at the top inside
<block type="page/html_head" name="head" as="head">
<action method="addJs"><script>newJS/jquery-1.3.2.min.js</script></action>
<action method="addJs"><script>newJS/jquery.js</script></action>
<action method="addJs"><script>newJS/validation_created.js</script></action>
<action method="addJs"><script>newJS/jquery.autocomplete.js</script></action>
<action method="addJs"><script>prototype/prototype.js</script></action>
<action method="addJs" ifconfig="dev/js/deprecation"><script>prototype/deprecation.js</script></action>

like the above first your custom js and then all the other magento js.

it solved my problem actually may be it can do the same for others

post me reply’s.

 
Magento Community Magento Community
Magento Community
Magento Community
 
dltr_org
Sr. Member
 
Avatar
Total Posts:  167
Joined:  2008-09-12
rockdale, sydney, australia
 
NaveenRahul - 17 October 2010 12:42 PM

element.attachEvent is not a function

did you fix it? i found same error today.

Update: found here:
http://www.magentocommerce.com/boards/viewthread/17780/#t225111

i removed that fix when i upgraded jquery and didn’t realize that smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
OOOeee
Jr. Member
 
Total Posts:  7
Joined:  2011-01-02
 

you are a genius .... worked for me.

started to get an error when included a custom jquery slider.

rearranged the js in the page.xml and is all back to normal.

thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
NaveenRahul
Jr. Member
 
Total Posts:  26
Joined:  2010-05-12
 
OOOeee - 30 January 2011 03:25 PM

you are a genius .... worked for me.

started to get an error when included a custom jquery slider.

rearranged the js in the page.xml and is all back to normal.

thanks

Thanks,
Bro

 
Magento Community Magento Community
Magento Community
Magento Community
 
jtroump
Member
 
Total Posts:  49
Joined:  2011-04-11
 

Thank you very much.
I got this error when tried to add a custom jQuery carousel in home page and resolved it with your solution.
Good work, well done.

 
Magento Community Magento Community
Magento Community
Magento Community
 
junaidbhura
Jr. Member
 
Avatar
Total Posts:  12
Joined:  2010-07-01
Bangalore, India
 

You the man!

 
Magento Community Magento Community
Magento Community
Magento Community
 
jeuelc
Jr. Member
 
Total Posts:  1
Joined:  2011-06-06
 

It solved my problem.
Thanks!
Cheers!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top