Page 1 of 1

pop up message in webppage

PostPosted: Thu Apr 05, 2012 12:10 am
by samhans
steve and all my friends:

how could i show pop up message in my dashboard. i have done it in my own other web page but how to include it in xataface webpage.


please help.

thanks in advance

Re: pop up message in webppage

PostPosted: Thu Apr 05, 2012 9:17 am
by shannah
You mean like a Javascript alert?

Code: Select all
<script>
alert('This is a popup message');
</script>

Re: pop up message in webppage

PostPosted: Thu Apr 05, 2012 10:20 am
by samhans
Steve like window.open in javascript . but how to call the unload event in my dashboard template.

Re: pop up message in webppage

PostPosted: Tue Apr 10, 2012 1:18 pm
by shannah
You can call any javascript you want inside a template. Just put it inside a <script> tag.

If you are putting the javascript directly in your template (as opposed to linking to a separate javascript file) you'll also need to wrap it with {literal} {/literal} tags so that Smarty doesn't choke on the curly braces in javascript.

e.g.
Code: Select all
<script>
{literal}
window.unload = function(){
    // Do some stuff

}
{/literal}
</script>


-Steve