This helps?

<html>

   <head>
      <title> Test </title>
      <script type="text/javascript">
         function dothis ( var1, var2 ) {
            if ( console !== undefined ) {
               console.log ( var1 + " : " + var2 );
            }
            else {
               alert ( var1 + " : " + var2 );
            }
         }

      </script>
   </head>

   <body>

      <a href="javascript:;" onclick="dothis('params1',
'param2');">Click me!</a> <br/>

      <script type="text/javascript">
         var dynamicValue = Math.random();
      </script>
      <a href="javascript:;" onclick="dothis(dynamicValue,
'param2');">Click me too!</a>

   </body>

</html>


On Wed, Sep 8, 2010 at 3:25 PM, Imad Elharoussi
<imad.elharou...@gmail.com> wrote:
> Hi I'm sorry to post this question which is related to javascript because I
> don't get early response from javascript forum
>
> I don't know how to pass parameters to a function which is called when I
> click
>
> I tried this but it doesn't work
>
>  function details(id_application, id_server)
> {
> ....
>
> tableau += "<td > <a href='javascript:;' onclick=play('id_application',
> 'id_server')>Play </a> </td>";
>
> I tried also this:
>
> tableau += "<td > <a href='javascript:;' onclick=play(" + id_application +
> "," + id_server + ")>Play </a> </td>";
>
> }
>
> please help
> thank you
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Shamail Tayyab
Blog: http://shamail.in/blog

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to