Hi,
When running jquery ui 1.8.23 I used to be able to pass parameters through my ajax tabs just like that :
- <li><a href="my_url.php?my_param=my_value">My Tab Name</a></li>
I'm now trying to migrate to 1.9.1 and it's a total different story... as soon as I add
- "?my_param=my_value"
to my url I run into problems. For instance I will not be able to drop items into the tabs generated that way.
So I decided to explore the ajaxOption area to see if I could fin a workaround... I was thinking of doing something like:
- <li><a href="my_url.php" my_param="my_value">My Tab Name</a></li>
and then get my_param attr value through some ajaxOption coding...
My problem is that I was just not able to do so... my post value would never land to my my_url.php page :-(
Besides I read
here that ajaxOption is going to be deprecated in 1.10 in favor of beforeLoad... same issue here...I was never able to make it through....
Here's what I've tried so far (among few other trials):
- $(function() {
-
- var $tabs = $("#tabs").tabs({
- load: function(event, ui) {
- var post_variables = {my_param:'my_param'};
- $("#tabs").tabs("option", "ajaxOptions",{
- type: 'POST',
- data: post_variables,
- error: function(xhr, status, index, anchor) {
- $(anchor.hash).html("Couldn't load this tab. We'll try to fix this as soon as possible. " + "If this wouldn't be a demo.");
- }
- })
- etc...
So could anyone help with:
- the right way to get post variable through ajax tabs ?
- confirm (or not) the fact that ajaxOption should be replaced my BeforeLoad ?
Thanks for reading !