Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JavaScript
  4. Java Script Error

Java Script Error

Scheduled Pinned Locked Moved JavaScript
csharpjavajavascriptasp-netsysadmin
4 Posts 4 Posters 7 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MathewPV
    wrote on last edited by
    #1

    I am using javascript to create three tabs with field in the asp.net web application. while validating the second tab the message is displayed in the label but the selected tab is the first one. the java script is as follows

    function Function1()
    {
    document.getElementById('Tab1').style.display = "none";
    document.getElementById('Tab2').style.display = "block";
    document.getElementById('Tab3').style.display = "none";
    }

    server side code

    Button1.Attributes.Add("OnClick", "Javascript:return Function1()");
    ScriptManager.RegisterStartupScript(this, this.GetType(), "Function1", "Button1_OnClick", true);

    N S 2 Replies Last reply
    0
    • M MathewPV

      I am using javascript to create three tabs with field in the asp.net web application. while validating the second tab the message is displayed in the label but the selected tab is the first one. the java script is as follows

      function Function1()
      {
      document.getElementById('Tab1').style.display = "none";
      document.getElementById('Tab2').style.display = "block";
      document.getElementById('Tab3').style.display = "none";
      }

      server side code

      Button1.Attributes.Add("OnClick", "Javascript:return Function1()");
      ScriptManager.RegisterStartupScript(this, this.GetType(), "Function1", "Button1_OnClick", true);

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      What html elements are Tab1, Tab2 and Tab3? Div, span, p, ?? You should perhaps read about element display, http://www.webdesignfromscratch.com/html-css/css-block-and-inline/[^] I can't tell from the code provided what exactly you are trying to accomplish but it seems better handled on the client-side with out a post just to have the button call function1. You should also look into JQuery[^]


      I know the language. I've read a book. - _Madmatt

      1 Reply Last reply
      0
      • M MathewPV

        I am using javascript to create three tabs with field in the asp.net web application. while validating the second tab the message is displayed in the label but the selected tab is the first one. the java script is as follows

        function Function1()
        {
        document.getElementById('Tab1').style.display = "none";
        document.getElementById('Tab2').style.display = "block";
        document.getElementById('Tab3').style.display = "none";
        }

        server side code

        Button1.Attributes.Add("OnClick", "Javascript:return Function1()");
        ScriptManager.RegisterStartupScript(this, this.GetType(), "Function1", "Button1_OnClick", true);

        S Offline
        S Offline
        Sunasara Imdadhusen
        wrote on last edited by
        #3

        Do you want to validate only those validation they are available only on first tab or selected tab using javascript?

        sunaSaRa Imdadhusen +91 99095 44184 +91 02767 284464

        A 1 Reply Last reply
        0
        • S Sunasara Imdadhusen

          Do you want to validate only those validation they are available only on first tab or selected tab using javascript?

          sunaSaRa Imdadhusen +91 99095 44184 +91 02767 284464

          A Offline
          A Offline
          Ankur m
          wrote on last edited by
          #4

          Isn't that a question and should have a Question or General icon?

          ..Go Green..

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups