• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 245
  • Last Modified:

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,
0
GamesNET2
Asked:
GamesNET2
  • 3
  • 2
  • 2
  • +1
3 Solutions
 
Gurvinder Pal SinghCommented:
did you tried with AJAX submit of the form?
0
 
GamesNET2Author Commented:
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...
0
 
leakim971PluritechnicianCommented:
>is there an easy way to convert a form from a simple submit form to an ajax request?

may help : http://jquery.malsup.com/form/
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
GamesNET2Author Commented:
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?
0
 
leakim971PluritechnicianCommented:
>Will I be able to do this using that ajax form?

Of course : go go go!
0
 
Michel PlungjanIT ExpertCommented:
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)
 
0
 
Michel PlungjanIT ExpertCommented:
0
 
GamesNET2Author Commented:
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,
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now