Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8634539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:45:00+00:00 2026-06-12T09:45:00+00:00

Basically I have MVC site with few tabs on my page, that uses JavaScript.

  • 0

Basically I have MVC site with few tabs on my page, that uses JavaScript.

Then I have JavaScript method that reads this URL and uses AJAX to select appropriate tab like so:

function onbodyLoad(URL) {

    if (URL.indexOf("Login/Register") != -1) {
        var index = 4;
        var $tabs = $('#tabs').tabs();
        $tabs.tabs('url', index, "/Login/RegistrationConfirmation");
        $tabs.tabs('select', index + 1); 
        $tabs.tabs('select', index); 
    }
}

Now I am checking few properties for null in httppost method in controller and return a view. It works but the style is missing so had to do it the above way.

Would it be possible to write to page URL “Success” if no error and if they null write to url “Error”. so in above function I can check the URL and forward to appropriate tab.

Or maybe write an actionresult method with parameter and return that. But have no idea…anyone can shed some light please

Hope it makes sense.


Update:
On my controller i did this to add parameter to my register view:

RouteValueDictionary rvd = new RouteValueDictionary();
rvd.Add("ParamID", "1");
return RedirectToAction("Register", "Login", rvd);

And Jquery I did this to read the url and select that tab :

if (URL.indexOf("Login/Register?ParamID=1") != -1) {
    var index = 2;
    var $tabs = $('#tabs').tabs(); 
    $tabs.tabs('url', index, "/Login/Register");
    $tabs.tabs('select', index + 1); 
    $tabs.tabs('select', index); 
}

I can see the url with parameter but the jquery dont seem to work, it just says cannot be found. any help please?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T09:45:01+00:00Added an answer on June 12, 2026 at 9:45 am

    If you look at the API, you might be able to find the ajaxOptions-option for the tab initialization.

    $tabs.tabs({ ajaxOptions: { async: false } });
    

    $tabs.tabs({ ajaxOptions: { async: false } });

    And more appropriate:

    // Definition of the tabs variable, note in particular the argument 'ajaxOptions'
    var $tabs = $('#example').tabs({
        ajaxOptions: {
            success: function() {
                $tabs.tabs('select', getIndex() + 1); 
                $tabs.tabs('select', getIndex() );
            },
            error: function() {}
        }
    });
    
    function getIndex() {
        return 4;
    }
    
    function onbodyLoad(URL) {
    
        if (URL.indexOf("Login/Register") != -1) {
    
            var $tabs = $('#tabs').tabs();
            $tabs.tabs('url', index, "/Login/RegistrationConfirmation");
        }
    }
    

    Would that be helpful..?

    P.S. I didn’t test this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET MVC site (Master Page + Content pages). On the master
I have a ASP.NET MVC site that is locked down using Forms Authentication. The
I have a site written in ASP.NET MVC. I have a page where the
I am wondering if the following is possible in MVC 3 I basically have
I have small problem with Spring MVC. Basically what I'm trying to do is
I basically have a program that filters records from one excel file to another
I basically have three tables, posts, images and postimages (this simply contains the ids
I basically have 7 select statements that I need to have the results output
We currently have a product that uses Sharepoint and a number different Web Part
Basically I have an MVC 3 form which sends a mail to my inbox

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.