Add a javascript file in Magento 1.9
I'm discovering magento since 1 week. But i have a problem now.
I need to include a javascript file in my admin panel to sort a list according to another.
I'm using magento 1.9 and i really don't find any tutorial to do this.
Please can someone explain me clearly how to do this because i'm really stuck at this point.
magento-1.9 php admin javascript
bumped to the homepage by Community♦ 11 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I'm discovering magento since 1 week. But i have a problem now.
I need to include a javascript file in my admin panel to sort a list according to another.
I'm using magento 1.9 and i really don't find any tutorial to do this.
Please can someone explain me clearly how to do this because i'm really stuck at this point.
magento-1.9 php admin javascript
bumped to the homepage by Community♦ 11 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Do you want to add the js globally to your backend or just to a specifiv grid view? Are you using a module or just altering core files?
– Yiorgos Moschovitis
May 27 '16 at 10:05
"(Ok, my message has been deleted, i don't know why...)" - because it is not an answer. Stack Exchange does not work like a forum. If you want to add details, edit the question. Only post an answer if you have a solution.
– Fabian Schmengler
May 27 '16 at 15:43
add a comment |
I'm discovering magento since 1 week. But i have a problem now.
I need to include a javascript file in my admin panel to sort a list according to another.
I'm using magento 1.9 and i really don't find any tutorial to do this.
Please can someone explain me clearly how to do this because i'm really stuck at this point.
magento-1.9 php admin javascript
I'm discovering magento since 1 week. But i have a problem now.
I need to include a javascript file in my admin panel to sort a list according to another.
I'm using magento 1.9 and i really don't find any tutorial to do this.
Please can someone explain me clearly how to do this because i'm really stuck at this point.
magento-1.9 php admin javascript
magento-1.9 php admin javascript
asked May 27 '16 at 9:39
NitchoulasNitchoulas
1
1
bumped to the homepage by Community♦ 11 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 11 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Do you want to add the js globally to your backend or just to a specifiv grid view? Are you using a module or just altering core files?
– Yiorgos Moschovitis
May 27 '16 at 10:05
"(Ok, my message has been deleted, i don't know why...)" - because it is not an answer. Stack Exchange does not work like a forum. If you want to add details, edit the question. Only post an answer if you have a solution.
– Fabian Schmengler
May 27 '16 at 15:43
add a comment |
Do you want to add the js globally to your backend or just to a specifiv grid view? Are you using a module or just altering core files?
– Yiorgos Moschovitis
May 27 '16 at 10:05
"(Ok, my message has been deleted, i don't know why...)" - because it is not an answer. Stack Exchange does not work like a forum. If you want to add details, edit the question. Only post an answer if you have a solution.
– Fabian Schmengler
May 27 '16 at 15:43
Do you want to add the js globally to your backend or just to a specifiv grid view? Are you using a module or just altering core files?
– Yiorgos Moschovitis
May 27 '16 at 10:05
Do you want to add the js globally to your backend or just to a specifiv grid view? Are you using a module or just altering core files?
– Yiorgos Moschovitis
May 27 '16 at 10:05
"(Ok, my message has been deleted, i don't know why...)" - because it is not an answer. Stack Exchange does not work like a forum. If you want to add details, edit the question. Only post an answer if you have a solution.
– Fabian Schmengler
May 27 '16 at 15:43
"(Ok, my message has been deleted, i don't know why...)" - because it is not an answer. Stack Exchange does not work like a forum. If you want to add details, edit the question. Only post an answer if you have a solution.
– Fabian Schmengler
May 27 '16 at 15:43
add a comment |
2 Answers
2
active
oldest
votes
First you have to choose a relevant layout(.xml) file based on the grid/page you want to include your javascript in.
Then in that layout you need to add the below code in the relevant section:
<layout>
<adminhtml_{relevant_layout_handle}>
<reference name="head">
<action method="addJs"><script>my_extension/adminhack.js</script></action>
<action method="addJs"><script>prototype/prototype.js</script></action>
</reference>
</adminhtml_{relevant_layout_handle}>
</layout>
Then you need to clear Magento caches and check if your file is loaded or not.
Hope this works for you
add a comment |
First you have to create one module and with in module's layout file you can add a javascript and css using above answer syntax.
add a comment |
protected by Community♦ May 27 '16 at 16:52
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
First you have to choose a relevant layout(.xml) file based on the grid/page you want to include your javascript in.
Then in that layout you need to add the below code in the relevant section:
<layout>
<adminhtml_{relevant_layout_handle}>
<reference name="head">
<action method="addJs"><script>my_extension/adminhack.js</script></action>
<action method="addJs"><script>prototype/prototype.js</script></action>
</reference>
</adminhtml_{relevant_layout_handle}>
</layout>
Then you need to clear Magento caches and check if your file is loaded or not.
Hope this works for you
add a comment |
First you have to choose a relevant layout(.xml) file based on the grid/page you want to include your javascript in.
Then in that layout you need to add the below code in the relevant section:
<layout>
<adminhtml_{relevant_layout_handle}>
<reference name="head">
<action method="addJs"><script>my_extension/adminhack.js</script></action>
<action method="addJs"><script>prototype/prototype.js</script></action>
</reference>
</adminhtml_{relevant_layout_handle}>
</layout>
Then you need to clear Magento caches and check if your file is loaded or not.
Hope this works for you
add a comment |
First you have to choose a relevant layout(.xml) file based on the grid/page you want to include your javascript in.
Then in that layout you need to add the below code in the relevant section:
<layout>
<adminhtml_{relevant_layout_handle}>
<reference name="head">
<action method="addJs"><script>my_extension/adminhack.js</script></action>
<action method="addJs"><script>prototype/prototype.js</script></action>
</reference>
</adminhtml_{relevant_layout_handle}>
</layout>
Then you need to clear Magento caches and check if your file is loaded or not.
Hope this works for you
First you have to choose a relevant layout(.xml) file based on the grid/page you want to include your javascript in.
Then in that layout you need to add the below code in the relevant section:
<layout>
<adminhtml_{relevant_layout_handle}>
<reference name="head">
<action method="addJs"><script>my_extension/adminhack.js</script></action>
<action method="addJs"><script>prototype/prototype.js</script></action>
</reference>
</adminhtml_{relevant_layout_handle}>
</layout>
Then you need to clear Magento caches and check if your file is loaded or not.
Hope this works for you
answered May 27 '16 at 10:28
Vicky DevVicky Dev
1,27761539
1,27761539
add a comment |
add a comment |
First you have to create one module and with in module's layout file you can add a javascript and css using above answer syntax.
add a comment |
First you have to create one module and with in module's layout file you can add a javascript and css using above answer syntax.
add a comment |
First you have to create one module and with in module's layout file you can add a javascript and css using above answer syntax.
First you have to create one module and with in module's layout file you can add a javascript and css using above answer syntax.
answered May 27 '16 at 10:35
Murtuza ZabuawalaMurtuza Zabuawala
12.5k73362
12.5k73362
add a comment |
add a comment |
protected by Community♦ May 27 '16 at 16:52
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
Do you want to add the js globally to your backend or just to a specifiv grid view? Are you using a module or just altering core files?
– Yiorgos Moschovitis
May 27 '16 at 10:05
"(Ok, my message has been deleted, i don't know why...)" - because it is not an answer. Stack Exchange does not work like a forum. If you want to add details, edit the question. Only post an answer if you have a solution.
– Fabian Schmengler
May 27 '16 at 15:43