Looks like your code will result in two Ajax requests, one from the
tab itself, and the second one triggered by your load handler.
Remove that load handler and simply change the tabs url in the select
handler. There is a tabs('url') method for this.
--Klaus
On 7 Jan., 21:11, shameless <[email protected]> wrote:
> I have read every post that I can find re: changing the URL prior to
> loading UI Tabs, all to no avail. Here is my problem...
>
> 1. Create a URL from text value of the tab and several dropdown
> values. For instance, if the text within a tabs /<span//> tag says
> "para1", then I use that as one of my parameters in my URL. According
> to my alert boxes, I have this part working....
>
> 2. Alter the href of the currently selected tab to the URL created in
> Step 1 <u>prior</u> to loading the panel via AJAX.. This is NOT
> working...
>
> Here is the HTML:
> <code>
> <div id="si" class="flora">
> <ul>
> <li><a href="para1" title="CurrentContent"><span>para1</span></
> a></li>
>
> <li><a href="para2" title="CurrentContent"><span>para2</span></
> a></li>
> <li><a href="para3" title="CurrentContent"><span>para3</span></
> a></li>
> <li><a href="para4" title="CurrentContent"><span>para4</span></
> a></li>
> </ul>
> </div>
>
> <div id="CurrentContent"> ... </div>
> </code>
>
> And the JS:
>
> <code>
> // global for retrieving the "current" panel id
> var CurrentPanel = "";
> // current path via jquery.url
> var CurrentURL= jQuery.url.attr("source");
>
> var $tabsPara = $("#si > ul").tabs({
> selected: null,
> select: function(e, ui) {
> // update global for editor synch AND AJAX call
> CurrentPanel = ui.tab.firstChild.textContent;
> alert('select');
> },
> load: function(ui) {
> // ajaxify
> var ajxURL=""+CurrentURL
> +'/ajx_get_content/'
> +CurrentPanel+'/'+$('#selectTemplates').val()
> +'/'+$('#selectPages').val();
> alert('url--'+ajxURL);
> $(ui.panel).load(ajxURL);
> return false;
> }
> });
>
> </code>
>
> I know that there are innumerable examples of similar attempts to
> this--and I have read perhaps 70 of them and tried different
> versions--
> but I cannot get this working. I apologize in advance for cluttering
> this forum with yet another request of this type.
>
> BTW, I have tested the "static" version of the AJAX URL and that is
> working.
>
> I am using:
>
> jquery-1.2.6.min.js
> and the same UI Tabs that is used on the docs page
>
> tia
>
> Russ
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---