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,
JavaScriptWeb Languages and StandardsScripting LanguagesWeb Development

Avatar of undefined
Last Comment
GamesNET2
ASKER CERTIFIED SOLUTION
Avatar of Gurvinder Pal Singh
Gurvinder Pal Singh
Flag of India image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of GamesNET2
GamesNET2
Flag of United Kingdom of Great Britain and Northern Ireland image

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
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of GamesNET2
GamesNET2
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

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?
Avatar of leakim971
leakim971
Flag of Guadeloupe image

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

Of course : go go go!
Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

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
Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of GamesNET2
GamesNET2
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

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,
JavaScript
JavaScript

JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.

127K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo