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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Help ME, This is the second day today but still i get answer..

Help ME, This is the second day today but still i get answer..

Scheduled Pinned Locked Moved ASP.NET
javascripthelp
7 Posts 4 Posters 0 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.
  • H Offline
    H Offline
    Hemant Garg
    wrote on last edited by
    #1

    Hello to Every one, There are two panel each containing a text box and and a button. Panel1 including textbox1 and button1 & Panel2 including textbox2 and button2. Now i want that after page_load if i select the textbox1 then entire panel2 should not be visible or vice-versa... Can this is possible without using javascript as i donn't know it... If not,could you give me The entire code in javascript for doing the above.. Suggest me.... Thank you.

    S S A 3 Replies Last reply
    0
    • H Hemant Garg

      Hello to Every one, There are two panel each containing a text box and and a button. Panel1 including textbox1 and button1 & Panel2 including textbox2 and button2. Now i want that after page_load if i select the textbox1 then entire panel2 should not be visible or vice-versa... Can this is possible without using javascript as i donn't know it... If not,could you give me The entire code in javascript for doing the above.. Suggest me.... Thank you.

      S Offline
      S Offline
      Sathesh Sakthivel
      wrote on last edited by
      #2

      Don't Repost.

      Regards, Satips.:rose:

      1 Reply Last reply
      0
      • H Hemant Garg

        Hello to Every one, There are two panel each containing a text box and and a button. Panel1 including textbox1 and button1 & Panel2 including textbox2 and button2. Now i want that after page_load if i select the textbox1 then entire panel2 should not be visible or vice-versa... Can this is possible without using javascript as i donn't know it... If not,could you give me The entire code in javascript for doing the above.. Suggest me.... Thank you.

        S Offline
        S Offline
        Sandeep Akhare
        wrote on last edited by
        #3

        Yes you can do it by using javascript. Now Check Panel in the Brower by clicking right button and view code i think Panel will get converted into span or similar to like that Why are you using Panel ?

        Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

        H 1 Reply Last reply
        0
        • H Hemant Garg

          Hello to Every one, There are two panel each containing a text box and and a button. Panel1 including textbox1 and button1 & Panel2 including textbox2 and button2. Now i want that after page_load if i select the textbox1 then entire panel2 should not be visible or vice-versa... Can this is possible without using javascript as i donn't know it... If not,could you give me The entire code in javascript for doing the above.. Suggest me.... Thank you.

          A Offline
          A Offline
          ash04
          wrote on last edited by
          #4

          Hi Hemant, I think, it is not possible without java script. But it can be easily done by Java script. If possible, dont use panel, use div for it.

          Ash

          H 1 Reply Last reply
          0
          • A ash04

            Hi Hemant, I think, it is not possible without java script. But it can be easily done by Java script. If possible, dont use panel, use div for it.

            Ash

            H Offline
            H Offline
            Hemant Garg
            wrote on last edited by
            #5

            This is the folowwing coding i download from net... But it is not working... TextBox3.Attributes.Add("onkeydown", "if(event.which || event.keyCode) {if((event.which == 13) || (event.keyCode == 13)) {document.getElementById('"+Usr.UniqueID+"').click(); return false;}} else {return true}; "); Suuggest me.. what problem is there

            1 Reply Last reply
            0
            • S Sandeep Akhare

              Yes you can do it by using javascript. Now Check Panel in the Brower by clicking right button and view code i think Panel will get converted into span or similar to like that Why are you using Panel ?

              Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

              H Offline
              H Offline
              Hemant Garg
              wrote on last edited by
              #6

              This is the folowwing coding i download from net... But it is not working... TextBox1.Attributes.Add("onkeydown", "if(event.which || event.keyCode) {if((event.which == 13) || (event.keyCode == 13)) {document.getElementById('"+Usr.UniqueID+"').click(); return false;}} else {return true}; "); Suuggest me.. what problem is there

              S 1 Reply Last reply
              0
              • H Hemant Garg

                This is the folowwing coding i download from net... But it is not working... TextBox1.Attributes.Add("onkeydown", "if(event.which || event.keyCode) {if((event.which == 13) || (event.keyCode == 13)) {document.getElementById('"+Usr.UniqueID+"').click(); return false;}} else {return true}; "); Suuggest me.. what problem is there

                S Offline
                S Offline
                Sandeep Akhare
                wrote on last edited by
                #7

                i doubt it contain both server side and Javascipt code in it :confused: Don't use panel use div instead panel put your all controls in these div tags and in javascript write a function that will unable and visible div tags depending on which textBox clicked call this function here register your javascript from page load in .cs NameTxtBx.Attributes.Add("OnClick", "javascript:MakeSum('Second');"); AdressTxtBx.Attributes.Add("OnClick", "javascript:MakeSum('first');"); this is javascirpt function function MakeSum( dats) { var tags=document.getElementById(dats); if(tags.disabled==true) { tags.disabled=false; } else { tags.disabled=true; } } here is the HTML

                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