[Skip to main content](#vessel-content)

#   jquery not working on some forms

##

- **[coquin](/forum/user/59497-coquin "View coquin's Profile")**
- [![coquin's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/59497-coquin "View coquin's Profile") Topic Author
- [ Offline](/forum/user/59497-coquin)

Less More

- Posts: 8
- Thank you received: 0
-
-

6 years 4 months ago [\#321044](#321044) by [coquin](/forum/user/59497-coquin "View coquin's Profile")  *[jquery not working on some forms](/forum/2-general-talk-about-hikashop/900231-jquery-not-working-on-some-forms#321044 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19 -- PHP version -- : 7.2.27 -- Browser(s) name and version -- : Chrome 83.0.4103.106 (Official Build) (64-bit)  Hello using Joomla 3.9.19 and Hikashop Starter 4.3.0  I need to add pieces of jquery to address forms (e.g. in order to change background-color of firstname inputbox when focused), but sometimes - e.g.when openining the form via Usercontrol panel - it seems not to be possible, nothing happens. Does it depend on something concerning ajax? Is there a way to bypass the problem? Thank you very much Ruggero")* was created by *[coquin](/forum/user/59497-coquin "View coquin's Profile")*

-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.19
-- PHP version -- : 7.2.27
-- Browser(s) name and version -- : Chrome 83.0.4103.106 (Official Build) (64-bit)

Hello
using Joomla 3.9.19 and Hikashop Starter 4.3.0

I need to add pieces of jquery to address forms (e.g. in order to change background-color of firstname inputbox when focused), but sometimes - e.g.when openining the form via Usercontrol panel - it seems not to be possible, nothing happens.
Does it depend on something concerning ajax? Is there a way to bypass the problem?
Thank you very much
Ruggero

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwMDIzMS1qcXVlcnktbm90LXdvcmtpbmctb24tc29tZS1mb3Jtcz90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86322
- Thank you received: 14281
-
-

6 years 4 months ago [\#321081](#321081) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[jquery not working on some forms](/forum/2-general-talk-about-hikashop/900231-jquery-not-working-on-some-forms#321081 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19 -- PHP version -- : 7.2.27 -- Browser(s) name and version -- : Chrome 83.0.4103.106 (Official Build) (64-bit)  Hello using Joomla 3.9.19 and Hikashop Starter 4.3.0  I need to add pieces of jquery to address forms (e.g. in order to change background-color of firstname inputbox when focused), but sometimes - e.g.when openining the form via Usercontrol panel - it seems not to be possible, nothing happens. Does it depend on something concerning ajax? Is there a way to bypass the problem? Thank you very much Ruggero")*

Hi,

That's probably because if you add your javascript code to the form view file it is not being processed when the interface is being loaded in AJAX. I suppose because you have your code wrapped in jquery.ready ( [ learn.jquery.com/using-jquery-core/document-ready/](https://learn.jquery.com/using-jquery-core/document-ready/) ) which isn't called when the JS is run after the AJAX.
If you edit the file address / listing.php via the menu Display&gt;Views, you'll see many times the line: Code:

t.loading(false);

In each places, you can call your own code after the interface is being refreshed in AJAX.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwMDIzMS1qcXVlcnktbm90LXdvcmtpbmctb24tc29tZS1mb3Jtcz90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[coquin](/forum/user/59497-coquin "View coquin's Profile")**
- [![coquin's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/59497-coquin "View coquin's Profile") Topic Author
- [ Offline](/forum/user/59497-coquin)

Less More

- Posts: 8
- Thank you received: 0
-
-

6 years 4 months ago [\#321103](#321103) by [coquin](/forum/user/59497-coquin "View coquin's Profile")  Replied by *[coquin](/forum/user/59497-coquin "View coquin's Profile")* on topic *[jquery not working on some forms](/forum/2-general-talk-about-hikashop/900231-jquery-not-working-on-some-forms#321103 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19 -- PHP version -- : 7.2.27 -- Browser(s) name and version -- : Chrome 83.0.4103.106 (Official Build) (64-bit)  Hello using Joomla 3.9.19 and Hikashop Starter 4.3.0  I need to add pieces of jquery to address forms (e.g. in order to change background-color of firstname inputbox when focused), but sometimes - e.g.when openining the form via Usercontrol panel - it seems not to be possible, nothing happens. Does it depend on something concerning ajax? Is there a way to bypass the problem? Thank you very much Ruggero")*

Thank you for your prompt reply, Nicolas.
I took a look to listing.php and sow, but sorry I'm not so handy with ajax: would you give me a little example? Something like a js alert when clicking on firstname textbox or something similar?
Thanks so much

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwMDIzMS1qcXVlcnktbm90LXdvcmtpbmctb24tc29tZS1mb3Jtcz90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[coquin](/forum/user/59497-coquin "View coquin's Profile")**
- [![coquin's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/59497-coquin "View coquin's Profile") Topic Author
- [ Offline](/forum/user/59497-coquin)

Less More

- Posts: 8
- Thank you received: 0
-
-

6 years 4 months ago [\#321104](#321104) by [coquin](/forum/user/59497-coquin "View coquin's Profile")  Replied by *[coquin](/forum/user/59497-coquin "View coquin's Profile")* on topic *[jquery not working on some forms](/forum/2-general-talk-about-hikashop/900231-jquery-not-working-on-some-forms#321104 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19 -- PHP version -- : 7.2.27 -- Browser(s) name and version -- : Chrome 83.0.4103.106 (Official Build) (64-bit)  Hello using Joomla 3.9.19 and Hikashop Starter 4.3.0  I need to add pieces of jquery to address forms (e.g. in order to change background-color of firstname inputbox when focused), but sometimes - e.g.when openining the form via Usercontrol panel - it seems not to be possible, nothing happens. Does it depend on something concerning ajax? Is there a way to bypass the problem? Thank you very much Ruggero")*

I mean also: where have I to put the code?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwMDIzMS1qcXVlcnktbm90LXdvcmtpbmctb24tc29tZS1mb3Jtcz90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86322
- Thank you received: 14281
-
-

6 years 4 months ago [\#321135](#321135) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[jquery not working on some forms](/forum/2-general-talk-about-hikashop/900231-jquery-not-working-on-some-forms#321135 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19 -- PHP version -- : 7.2.27 -- Browser(s) name and version -- : Chrome 83.0.4103.106 (Official Build) (64-bit)  Hello using Joomla 3.9.19 and Hikashop Starter 4.3.0  I need to add pieces of jquery to address forms (e.g. in order to change background-color of firstname inputbox when focused), but sometimes - e.g.when openining the form via Usercontrol panel - it seems not to be possible, nothing happens. Does it depend on something concerning ajax? Is there a way to bypass the problem? Thank you very much Ruggero")*

Hi,

Just put alert('test1'); and alert('test 2'); etc after each t.loading(false); and you'll see see where you need to add your javascript code based on which alert is displayed when you're on the area with the issue you have.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwMDIzMS1qcXVlcnktbm90LXdvcmtpbmctb24tc29tZS1mb3Jtcz90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[coquin](/forum/user/59497-coquin "View coquin's Profile")**
- [![coquin's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/59497-coquin "View coquin's Profile") Topic Author
- [ Offline](/forum/user/59497-coquin)

Less More

- Posts: 8
- Thank you received: 0
-
-

6 years 4 months ago [\#321167](#321167) by [coquin](/forum/user/59497-coquin "View coquin's Profile")  Replied by *[coquin](/forum/user/59497-coquin "View coquin's Profile")* on topic *[jquery not working on some forms](/forum/2-general-talk-about-hikashop/900231-jquery-not-working-on-some-forms#321167 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19 -- PHP version -- : 7.2.27 -- Browser(s) name and version -- : Chrome 83.0.4103.106 (Official Build) (64-bit)  Hello using Joomla 3.9.19 and Hikashop Starter 4.3.0  I need to add pieces of jquery to address forms (e.g. in order to change background-color of firstname inputbox when focused), but sometimes - e.g.when openining the form via Usercontrol panel - it seems not to be possible, nothing happens. Does it depend on something concerning ajax? Is there a way to bypass the problem? Thank you very much Ruggero")*

Got it! Thank you Nicolas, I'm very grateful.
ruggero

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwMDIzMS1qcXVlcnktbm90LXdvcmtpbmctb24tc29tZS1mb3Jtcz90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.062 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
