On Sunday, May 20, 2012 3:43:38 PM UTC-4, Ashraf Mansour wrote:
>
> thanks for the immediate reply.
>
> param1 and param2 are determined on the client side.
>
> how can it be generated by javascript?
>
>
It depends. Here's one example:

<script>
jQuery(function() {
  var param1 = 'hello'
  var param2 = 'world'
  jQuery('a#mylink').attr('href', '{{=URL("action")}}' + '/' + param1 + '/' 
+ param2);
});
</script>

<h3>{{=A('...', _href='', _id='mylink')}}</h3>

When the page is loaded, the href of the mylink anchor tag will be replaced 
with the "action" URL along with the values of param1 and param2 appended. 
Of course, you'll need some way to set the values of param1 and param2, and 
there may be some other event that should trigger the replacement -- it 
depends what you're trying to do.

Anthony

Reply via email to