Link to home
Start Free TrialLog in
Avatar of GamesNET2
GamesNET2Flag for United Kingdom of Great Britain and Northern Ireland

asked on

submit form, then select tab

Hi There,

I have a tab which has a form in it, and once the form is submitted it adds parameters to the url, and gives results below the form. All this happens inside a tab.

Originally i set the action method of the form to arrive at the URL then #pricing to select the tab autoamtically. However this doesnt seem to work in IE.

So to try a different method i'm trying this:

$('#price_form').submit(function() {
      $('#hotel_tabs_block_id').tabs('select', '#tab_pricing');
});

But of course when the page reloads, it's resetting the above. Does anyone have a better way of doing this?

I just need to fill in a form, then load the page with a specific tab!

All help appreciated,
Thanks,
ASKER CERTIFIED SOLUTION
Avatar of Gurvinder Pal Singh
Gurvinder Pal Singh
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of GamesNET2

ASKER

To be honest - no i havent, is there an easy way to convert a form from a simple submit form to an ajax request? Never really tried ajax before...
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
at the moment the form is submitted and then the parameters from the form are used in a sql query which displays results.

Will I be able to do this using that ajax form?
>Will I be able to do this using that ajax form?

Of course : go go go!
Leakim I'm not on my computer but I believe jQuery can do the form stuff without a plugin. The malsup is very old (jq1.3)
 
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I had a quick try with that, to complicate things, i'm using expression engine, and when the action is on the same page, it is putting a whole new page into that div, - bit of a nightmare.

I've currently set the tab manually using the 'select' jquery for tabs. I tried to do this dynamically with a hidden form using a parameter but for some reason the jquery plugin getUrlParam wasn't playing ball.

I know i'm gonna have to update this form to ajax soon... but not yet!

Thanks for all help,