How to have jquery ui-tab click automatically call cgi program

How to have jquery ui-tab click automatically call cgi program

Hello,

Im probably making this more difficult than it actually is, but ...

I want to click a jquery ui-tab button and have it automatically call a cgi program.

How would I do this, can I assign an location.href on a tab click?

Can I do something like this?

  
<div id="tabs">
<ul>
<li><a href="tabs-1">Program 1</a></li>
<li><a href="tabs-2">Program 2</a></li>
<li><a href="tabs-3">Program 3</a></li>
</ul>
<div id="tabs-1">
 location.href("cgipgm1.pgm")
</div>
<div id="tabs-2">
location.href("cgipgm2.pgm")
</div>
<div id="tabs-3"> location.href("cgipgm3.pgm")
</div>
</div>