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. change the text of a element dinamicaly

change the text of a element dinamicaly

Scheduled Pinned Locked Moved ASP.NET
helpquestion
11 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.
  • A Offline
    A Offline
    abu sundus
    wrote on last edited by
    #1

    i made a multiline tooltip that appears when the mouse over a link this tooltip is a div element , i have multiple links and i need to set the text of the div element according to the link under the mouse which means that i must change the div text dinamically can any body help me??

    S I J 3 Replies Last reply
    0
    • A abu sundus

      i made a multiline tooltip that appears when the mouse over a link this tooltip is a div element , i have multiple links and i need to set the text of the div element according to the link under the mouse which means that i must change the div text dinamically can any body help me??

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

      Yes make that div tag runat server and give proper id Now you can access that div at server side can do anything with it at runtime ... But why are you using div tag for tool tip? use anchor tag and make run at server or you have asp.net Hyperlink control in that you have tool tip property

      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... "

      A 1 Reply Last reply
      0
      • S Sandeep Akhare

        Yes make that div tag runat server and give proper id Now you can access that div at server side can do anything with it at runtime ... But why are you using div tag for tool tip? use anchor tag and make run at server or you have asp.net Hyperlink control in that you have tool tip property

        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... "

        A Offline
        A Offline
        abu sundus
        wrote on last edited by
        #3

        i need multiline tooltip that can contain table so i used the div element the control of the apperance of the div element is by javascript function that showa and hide the div element depending on mouse position, i need to change the text of the div element using the javascript function not in the run time can you help me? regards

        S 1 Reply Last reply
        0
        • A abu sundus

          i need multiline tooltip that can contain table so i used the div element the control of the apperance of the div element is by javascript function that showa and hide the div element depending on mouse position, i need to change the text of the div element using the javascript function not in the run time can you help me? regards

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

          you can change it in javascript first see the source code of your page and check which is the property of div tag for tool tip make such changes in div by document.getElementById('DivtagId').PrpertyName='New tool tip'; Not sure but check it will work i think

          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... "

          A 2 Replies Last reply
          0
          • S Sandeep Akhare

            you can change it in javascript first see the source code of your page and check which is the property of div tag for tool tip make such changes in div by document.getElementById('DivtagId').PrpertyName='New tool tip'; Not sure but check it will work i think

            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... "

            A Offline
            A Offline
            abu sundus
            wrote on last edited by
            #5

            sorry i tried that but it does not work thanx

            1 Reply Last reply
            0
            • S Sandeep Akhare

              you can change it in javascript first see the source code of your page and check which is the property of div tag for tool tip make such changes in div by document.getElementById('DivtagId').PrpertyName='New tool tip'; Not sure but check it will work i think

              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... "

              A Offline
              A Offline
              abu sundus
              wrote on last edited by
              #6

              :) sorry i tried that but it does not work thanx

              S 1 Reply Last reply
              0
              • A abu sundus

                :) sorry i tried that but it does not work thanx

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

                Can you post the code how are you displaying the div tag i.e aspx page ? if then i could help you

                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... "

                A 1 Reply Last reply
                0
                • S Sandeep Akhare

                  Can you post the code how are you displaying the div tag i.e aspx page ? if then i could help you

                  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... "

                  A Offline
                  A Offline
                  abu sundus
                  wrote on last edited by
                  #8

                  <%@ Page Language="VB" AutoEventWireup="false" CodeFile="MyFavorites.aspx.vb" Inherits="MyFavorites" %> Untitled Page function toggleAllCheckboxes(rowsCount) { var idsIndex = 0 var mainCheckBox = document.getElementById('ChkBxRemoveAll') for (idsIndex=1;idsIndex<=rowsCount;idsIndex=idsIndex+2) { if(idsIndex<10) { var checkBox = document.getElementById('ctl0'+idsIndex) if (mainCheckBox.checked == true) {checkBox.checked = true} else {checkBox.checked = false} } else { var checkBox = document.getElementById('ctl'+idsIndex) if (mainCheckBox.checked == true) {checkBox.checked = true} else {checkBox.checked = false} } } } //***************************************************************** function UnCheckMainCheckBox(rowsCount) { var idsIndex = 0 var mainCheckBox = document.getElementById('ChkBxRemoveAll') for (idsIndex=1;idsIndex<=rowsCount;idsIndex=idsIndex+2) { if(idsIndex<10) { var checkBox = document.getElementById('ctl0'+idsIndex) if (checkBox.checked == false) {mainCheckBox.checked = false} } else </x-turndown>

                  S 1 Reply Last reply
                  0
                  • A abu sundus

                    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="MyFavorites.aspx.vb" Inherits="MyFavorites" %> Untitled Page function toggleAllCheckboxes(rowsCount) { var idsIndex = 0 var mainCheckBox = document.getElementById('ChkBxRemoveAll') for (idsIndex=1;idsIndex<=rowsCount;idsIndex=idsIndex+2) { if(idsIndex<10) { var checkBox = document.getElementById('ctl0'+idsIndex) if (mainCheckBox.checked == true) {checkBox.checked = true} else {checkBox.checked = false} } else { var checkBox = document.getElementById('ctl'+idsIndex) if (mainCheckBox.checked == true) {checkBox.checked = true} else {checkBox.checked = false} } } } //***************************************************************** function UnCheckMainCheckBox(rowsCount) { var idsIndex = 0 var mainCheckBox = document.getElementById('ChkBxRemoveAll') for (idsIndex=1;idsIndex<=rowsCount;idsIndex=idsIndex+2) { if(idsIndex<10) { var checkBox = document.getElementById('ctl0'+idsIndex) if (checkBox.checked == false) {mainCheckBox.checked = false} } else </x-turndown>

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

                    Sorry but which are the div tags which you are using as tool tip i am confused

                    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... "

                    1 Reply Last reply
                    0
                    • A abu sundus

                      i made a multiline tooltip that appears when the mouse over a link this tooltip is a div element , i have multiple links and i need to set the text of the div element according to the link under the mouse which means that i must change the div text dinamically can any body help me??

                      I Offline
                      I Offline
                      Imran Khan Pathan
                      wrote on last edited by
                      #10

                      visit this link.AjaxPro. best Regard Pathan

                      ---------------------------------------------------

                      1 Reply Last reply
                      0
                      • A abu sundus

                        i made a multiline tooltip that appears when the mouse over a link this tooltip is a div element , i have multiple links and i need to set the text of the div element according to the link under the mouse which means that i must change the div text dinamically can any body help me??

                        J Offline
                        J Offline
                        jc net
                        wrote on last edited by
                        #11

                        Maybe you can do it like this: document.getElementById('DivtagId').innerText='New text'; or document.getElementById('DivtagId').innerHTML='New text';

                        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