X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Trouble displaying a message box? (https://forum.x-cart.com/showthread.php?t=38234)

zebu 03-11-2008 10:24 PM

Trouble displaying a message box?
 
Hi Folks, I recently installed the free mod to put any enquiring form on each page - nice bit of work.

What I would like to do is display a windows confirmation box when the user clicks on the submit button.

However my javascript skills are almost non existent - so i can't get it to work.

Here is the code for the button on the form:

HTML Code:

{include file="buttons/submit.tpl" type="input" style="button" href="javascript: return XCM_enquire();}

I added an alert javascript code to the code liek follows :

HTML Code:

{include file="buttons/submit.tpl" type="input" style="button" href="javascript: return XCM_enquire(); alert("Thankyou your question has been submitted. ");}

I have tried a few variations - but nothing works any ideas? If I put script atgs around it it displays the message on the page load.

inebriate 03-11-2008 11:59 PM

Re: Trouble displaying a message box?
 
it is because of your quotations...

{include file="buttons/submit.tpl" type="input" style="button" href="javascript: return XCM_enquire(); alert('Thank you your question has been submitted.');"}

zebu 03-12-2008 02:59 AM

Re: Trouble displaying a message box?
 
Thanks for the pointer - you set me in the right direction. Thanks


All times are GMT -8. The time now is 01:31 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.