You can create the URL using javascript, but once a view has loaded, you'd probably want to filter using a control on the view.

> I heard that Javascript API is available in Tableau8 right ?

Tab 7 also has a Javascript API (see Embedding Views). It gives you a little more flexibility than the URL method. Tab 8 improves on this significantly allowing, for example, you to put a filter button outside of your view.