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

#   Success message when Vote

##

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

Less More

- Posts: 86
- Thank you received: 11
-
-

8 years 6 months ago [\#292254](#292254) by [simplecms](/forum/user/32423-simplecms "View simplecms's Profile")  *[Success message when Vote](/forum/42-vote/894625-success-message-when-vote#292254 "-- HikaShop version -- : 3.4 -- Joomla version -- : 3.8.7  I've tried to add a simple success message to the onclick event for sending a review and rating in but when the success message is added, the comment function ceases functioning. Can someone help me add a &quot;Message Received&quot; alert or  element to the vote/form file?  Here is my existing code that &quot;should&quot; work but doesn't:")* was created by *[simplecms](/forum/user/32423-simplecms "View simplecms's Profile")*

-- HikaShop version -- : 3.4
-- Joomla version -- : 3.8.7

I've tried to add a simple success message to the onclick event for sending a review and rating in but when the success message is added, the comment function ceases functioning. Can someone help me add a "Message Received" alert or &lt;p&gt; element to the vote/form file?

Here is my existing code that "should" work but doesn't:
Code:

&lt;input class="button btn" type="button" value="&lt;?php echo JText::_('HIKASHOP_SEND_COMMENT'); ?&gt;" onclick="hikashop_send_comment(); success();"/&gt; &lt;script&gt; function success() { alert("You're review has been received and will soon be approved by a moderator. Thank you!"); } &lt;/script&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3ZvdGUvODk0NjI1LXN1Y2Nlc3MtbWVzc2FnZS13aGVuLXZvdGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

8 years 6 months ago [\#292301](#292301) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Success message when Vote](/forum/42-vote/894625-success-message-when-vote#292301 "-- HikaShop version -- : 3.4 -- Joomla version -- : 3.8.7  I've tried to add a simple success message to the onclick event for sending a review and rating in but when the success message is added, the comment function ceases functioning. Can someone help me add a &quot;Message Received&quot; alert or  element to the vote/form file?  Here is my existing code that &quot;should&quot; work but doesn't:")*

Hello,

I just tested your modification and it worked fine on my end so you're probably having a JavaScript error on your website which prevent your JavaScript code to be triggered.

Best regards,
Mohamed Thelji.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3ZvdGUvODk0NjI1LXN1Y2Nlc3MtbWVzc2FnZS13aGVuLXZvdGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

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

Less More

- Posts: 86
- Thank you received: 11
-
-

8 years 6 months ago [\#292306](#292306) by [simplecms](/forum/user/32423-simplecms "View simplecms's Profile")  Replied by *[simplecms](/forum/user/32423-simplecms "View simplecms's Profile")* on topic *[Success message when Vote](/forum/42-vote/894625-success-message-when-vote#292306 "-- HikaShop version -- : 3.4 -- Joomla version -- : 3.8.7  I've tried to add a simple success message to the onclick event for sending a review and rating in but when the success message is added, the comment function ceases functioning. Can someone help me add a &quot;Message Received&quot; alert or  element to the vote/form file?  Here is my existing code that &quot;should&quot; work but doesn't:")*

Arg... I'm using a pretty native version of Hikashop, hardly modified at all. I checked console and only found an error about importing a Google Font. Would using a tabular view make a difference? Here's the page (the code is not in place since it breaks sending the comment) if that helps for a diagnosis: [ www.gorillamind.com/products/gorilla-mind-rush](https://www.gorillamind.com/products/gorilla-mind-rush) - under Leave a Review tab.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3ZvdGUvODk0NjI1LXN1Y2Nlc3MtbWVzc2FnZS13aGVuLXZvdGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86561
- Thank you received: 14307
-
-

8 years 6 months ago [\#292315](#292315) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Success message when Vote](/forum/42-vote/894625-success-message-when-vote#292315 "-- HikaShop version -- : 3.4 -- Joomla version -- : 3.8.7  I've tried to add a simple success message to the onclick event for sending a review and rating in but when the success message is added, the comment function ceases functioning. Can someone help me add a &quot;Message Received&quot; alert or  element to the vote/form file?  Here is my existing code that &quot;should&quot; work but doesn't:")*

Hi,

We would need to see the page with the issue to be able to say more.

Right now, without the code modified and with the form only available if you already purchased the product, we can't see anything.
If you can't do it on your live website, then try making a copy of the website so that we can look at the issue on the copy.

Also, I would recommend something simpler like: Code:

&lt;input class="button btn" type="button" value="&lt;?php echo JText::_('HIKASHOP_SEND_COMMENT'); ?&gt;" onclick="hikashop_send_comment(); alert('You\'re review has been received and will soon be approved by a moderator. Thank you!');"/&gt;

Because with your code, if another extension has a javascript function named success, it will break the extension.
That's why everything you see in the code of HikaShop is prefixed with hikashop so that there is no conflict with something else.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3ZvdGUvODk0NjI1LXN1Y2Nlc3MtbWVzc2FnZS13aGVuLXZvdGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

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

Less More

- Posts: 86
- Thank you received: 11
-
-

8 years 6 months ago [\#292395](#292395) by [simplecms](/forum/user/32423-simplecms "View simplecms's Profile")  Replied by *[simplecms](/forum/user/32423-simplecms "View simplecms's Profile")* on topic *[Success message when Vote](/forum/42-vote/894625-success-message-when-vote#292395 "-- HikaShop version -- : 3.4 -- Joomla version -- : 3.8.7  I've tried to add a simple success message to the onclick event for sending a review and rating in but when the success message is added, the comment function ceases functioning. Can someone help me add a &quot;Message Received&quot; alert or  element to the vote/form file?  Here is my existing code that &quot;should&quot; work but doesn't:")*

Arg. I tried that but it still doesn't send the comment. Alert displays just fine but its like it won't allow the comment to send some how. I'm at a loss.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3ZvdGUvODk0NjI1LXN1Y2Nlc3MtbWVzc2FnZS13aGVuLXZvdGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

8 years 6 months ago -  8 years 6 months ago [\#292396](#292396) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Success message when Vote](/forum/42-vote/894625-success-message-when-vote#292396 "-- HikaShop version -- : 3.4 -- Joomla version -- : 3.8.7  I've tried to add a simple success message to the onclick event for sending a review and rating in but when the success message is added, the comment function ceases functioning. Can someone help me add a &quot;Message Received&quot; alert or  element to the vote/form file?  Here is my existing code that &quot;should&quot; work but doesn't:")*

Hello,

What do you exactly mean by :

> Alert displays just fine but its like it won't allow the comment to send some how. I'm at a loss.

Can you give us more information about it through some screenshots for example ?

Also can you give us a link where we can reproduce and test the issue you are having ?

Thank you.

Last edit: 8 years 6 months ago by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3ZvdGUvODk0NjI1LXN1Y2Nlc3MtbWVzc2FnZS13aGVuLXZvdGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

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

Less More

- Posts: 86
- Thank you received: 11
-
-

8 years 6 months ago [\#292521](#292521) by [simplecms](/forum/user/32423-simplecms "View simplecms's Profile")  Replied by *[simplecms](/forum/user/32423-simplecms "View simplecms's Profile")* on topic *[Success message when Vote](/forum/42-vote/894625-success-message-when-vote#292521 "-- HikaShop version -- : 3.4 -- Joomla version -- : 3.8.7  I've tried to add a simple success message to the onclick event for sending a review and rating in but when the success message is added, the comment function ceases functioning. Can someone help me add a &quot;Message Received&quot; alert or  element to the vote/form file?  Here is my existing code that &quot;should&quot; work but doesn't:")*

Well weird update - it's working now. I have no idea why. I tried your code - nothing. Then I turned the comment function option to Vote and Comment - it WAS Vote and Comment Connected. Tried your code - it worked. Then I turned comment function back to Vote and Comment Connected. Still worked. Whatever. I also cleaned up the function a little to display a div instead of a dialog.
Here's the new code if anyone else wants to replicate: Code:

&lt;input class="button btn" type="button" value="&lt;?php echo JText::_('HIKASHOP_SEND_COMMENT'); ?&gt;" onclick="hikashop_send_comment(); hikacommentsuccess();"/&gt; &lt;div id="hikacommentsuccess" style="display:none"&gt;Your review has been received and will soon be approved by a moderator. Thank you!&lt;/div&gt; &lt;script&gt; function hikacommentsuccess() { var x = document.getElementById("hikacommentsuccess"); if (x.style.display === "block") { x.style.display = "none"; } else { x.style.display = "block"; } } &lt;/script&gt;

The following user(s) said Thank You: [nicolas](/forum/user/63-nicolas "View nicolas's Profile"), [oloccina](/forum/user/23273-oloccina "View oloccina's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3ZvdGUvODk0NjI1LXN1Y2Nlc3MtbWVzc2FnZS13aGVuLXZvdGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

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

Less More

- Posts: 86
- Thank you received: 11
-
-

8 years 5 months ago [\#292973](#292973) by [simplecms](/forum/user/32423-simplecms "View simplecms's Profile")  Replied by *[simplecms](/forum/user/32423-simplecms "View simplecms's Profile")* on topic *[Success message when Vote](/forum/42-vote/894625-success-message-when-vote#292973 "-- HikaShop version -- : 3.4 -- Joomla version -- : 3.8.7  I've tried to add a simple success message to the onclick event for sending a review and rating in but when the success message is added, the comment function ceases functioning. Can someone help me add a &quot;Message Received&quot; alert or  element to the vote/form file?  Here is my existing code that &quot;should&quot; work but doesn't:")*

We now have another challenge. We need this message to display ONLY IF the user has added a star rating and display the &lt;div id='hikashop_vote_status_form' class="hikashop_vote_notification" &gt;&lt;/div&gt; if the user HAS NOT added a star rating.

Can you help us add the necessary code?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3ZvdGUvODk0NjI1LXN1Y2Nlc3MtbWVzc2FnZS13aGVuLXZvdGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

8 years 5 months ago [\#292974](#292974) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Success message when Vote](/forum/42-vote/894625-success-message-when-vote#292974 "-- HikaShop version -- : 3.4 -- Joomla version -- : 3.8.7  I've tried to add a simple success message to the onclick event for sending a review and rating in but when the success message is added, the comment function ceases functioning. Can someone help me add a &quot;Message Received&quot; alert or  element to the vote/form file?  Here is my existing code that &quot;should&quot; work but doesn't:")*

Hello,

Please do not duplicate your posts.
[ www.hikashop.com/forum/install-update/89...er-hasn-t-rated.html](https://www.hikashop.com/forum/install-update/894763-show-empty-stars-if-user-hasn-t-rated.html)

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3ZvdGUvODk0NjI1LXN1Y2Nlc3MtbWVzc2FnZS13aGVuLXZvdGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

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

Less More

- Posts: 86
- Thank you received: 11
-
-

8 years 5 months ago [\#293034](#293034) by [simplecms](/forum/user/32423-simplecms "View simplecms's Profile")  Replied by *[simplecms](/forum/user/32423-simplecms "View simplecms's Profile")* on topic *[Success message when Vote](/forum/42-vote/894625-success-message-when-vote#293034 "-- HikaShop version -- : 3.4 -- Joomla version -- : 3.8.7  I've tried to add a simple success message to the onclick event for sending a review and rating in but when the success message is added, the comment function ceases functioning. Can someone help me add a &quot;Message Received&quot; alert or  element to the vote/form file?  Here is my existing code that &quot;should&quot; work but doesn't:")*

Read the other post. This issue is a separate issue. This thread is about showing a message to the user that they must ALSO provide a rating to post their comment. The other thread is about showing blank stars if the user hasn't added a rating.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3ZvdGUvODk0NjI1LXN1Y2Nlc3MtbWVzc2FnZS13aGVuLXZvdGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

8 years 5 months ago [\#293080](#293080) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Success message when Vote](/forum/42-vote/894625-success-message-when-vote#293080 "-- HikaShop version -- : 3.4 -- Joomla version -- : 3.8.7  I've tried to add a simple success message to the onclick event for sending a review and rating in but when the success message is added, the comment function ceases functioning. Can someone help me add a &quot;Message Received&quot; alert or  element to the vote/form file?  Here is my existing code that &quot;should&quot; work but doesn't:")*

Hello,

The solution for that customization will probably be to directly customize the "Mini" file of the "Vote" view of your front-end template but also the "vote.js" file.

Best regards,
Mohamed Thelji.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3ZvdGUvODk0NjI1LXN1Y2Nlc3MtbWVzc2FnZS13aGVuLXZvdGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) 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)
