Re: How to include a java script in a php tag (form)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>
> <?php
>
> and there is a special
>
> $html = '   blablablablabla   ';
>
> where all the html code is written for the form (table,...).
>
> The problem is that I have to include a javascript to be able to send the
> form to my email address. I don't know where and how to put it.
>
> Could someone help me please?
>
Why not just have your "Send" button call the javascript?

//Create your javascript function
<script language="JavaScript">
<!--
function myScript(){
  your email javascript
}

//-->
</script>
//Create your form
<?php
All your PHP code;
?>
//Make your "Send" button call your Javascript function
<input type="button" name="send" value="send"
onClick="javascript:myScript()">

HTH,
Dan

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux