converting a click function to call function
<p>I know this topic is asked before but they were not about jqueryui. Therefore I couldn't be sure will they work on my code. I have a pop up that is called from different components. But I have to write a click function for each call. I want to convert it to ca function that I can call it. My script is: </p>

<pre><code> &lt;script type="text/javascript"&gt;
        $(document).ready(function () {
            $('a#popup').live('click', function (e) {

                var page = $(this).attr("href")

                var $dialog = $('&lt;div id="silmeIframe"&gt;&lt;/div&gt;')
                .html('&lt;iframe  style="border: 0px; " src="' + page + '" width="500px" height="500px"&gt;&lt;/iframe&gt;')
                .dialog({
                    autoOpen: false,
                    modal: true,
                    height: 'auto',
                    resizable: 'false',
                    width: 'auto',
                    title: "Silmeyi onaylıyor musunuz?",
                    close: function (event, ui) {

                        __doPostBack('&lt;%= btnRefresh.ClientID %&gt;', '');
                    }
                });
                $dialog.dialog('open');
                e.preventDefault();

            });

        });
    &lt;/script&gt;
</code></pre>

<p>Now, I want it work like</p>

<pre><code>&lt;a onclick="NewFunctionName(parameter1,parameter2,,parameter3)"&gt;click&lt;a/&gt;
</code></pre>
