Click here to Skip to main content
16,015,635 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How to bind three gridview independly? Pin
kumar_k50818-Nov-10 1:25
kumar_k50818-Nov-10 1:25 
QuestionHow to assign the value to text area control i.e in iframe using screen scraping Pin
kalyan_vb15-Nov-10 1:45
kalyan_vb15-Nov-10 1:45 
QuestionHow to assign the value to text area control i.e in iframe using screen scrapting Pin
kalyan_vb15-Nov-10 1:41
kalyan_vb15-Nov-10 1:41 
Questionhow to block input control using Modal Popup Control? Pin
Tridip Bhattacharjee14-Nov-10 23:54
professionalTridip Bhattacharjee14-Nov-10 23:54 
Questioncontrol position problem in VS2008 IDE? Pin
Tridip Bhattacharjee14-Nov-10 0:33
professionalTridip Bhattacharjee14-Nov-10 0:33 
AnswerRe: control position problem in VS2008 IDE? Pin
Dr.Walt Fair, PE14-Nov-10 12:25
professionalDr.Walt Fair, PE14-Nov-10 12:25 
AnswerRe: control position problem in VS2008 IDE? Pin
praveen_gpk15-Nov-10 19:21
praveen_gpk15-Nov-10 19:21 
QuestionDIV position problem generated dynamically from javascript Pin
Tridip Bhattacharjee14-Nov-10 0:24
professionalTridip Bhattacharjee14-Nov-10 0:24 
here i generate a div from javascript and position over the text box.

i found two problem
1) my code is working only for IE.
2) text inside in div is not getting positioned vertically center.

here is my code.

<html xmlns="http://www.w3.org/1999/xhtml" >  
    <head id="Head1" runat="server">  
        <title>Untitled Page</title>  
        <script type="text/javascript" language="javascript">

            var modalWindow = null;
            function drawDiv() 
            {
                var txt = document.getElementById('TextBox1');
                var dime = new Dimension(txt);
                modalWindow = document.createElement('div');
                modalWindow.style.position = 'absolute';
                modalWindow.setAttribute("align", "center");
                modalWindow.setAttribute("vertical-align", "middle");
                modalWindow.innerHTML = '<p>hello...</p>';
                modalWindow.style.left = dime.x;
                modalWindow.style.top = dime.y;
                modalWindow.style.width = dime.w;
                modalWindow.style.height = dime.h;
                modalWindow.style.backgroundColor = '#C0C0C0';
                document.body.appendChild(modalWindow);
                return false;
            }

            function hider(whichDiv) 
            {
                document.getElementById(modalWindow).style.display = 'none';
            }

            function Dimension(element) 
            {
                this.x = -1;
                this.y = -1;
                this.w = 0;
                this.h = 0;
                if (element == document) 
                {
                    this.x = element.body.scrollLeft;
                    this.y = element.body.scrollTop;
                    this.w = element.body.clientWidth;
                    this.h = element.body.clientHeight;
                }
                else if (element != null) 
                {
                    var e = element;
                    var left = e.offsetLeft;
                    while ((e = e.offsetParent) != null) 
                    {
                        left += e.offsetLeft;
                    }
                    var e = element;
                    var top = e.offsetTop;
                    while ((e = e.offsetParent) != null) 
                    {
                        top += e.offsetTop;
                    }
                    this.x = left;
                    this.y = top;
                    this.w = element.offsetWidth;
                    this.h = element.offsetHeight;
                }
            }
       </script>  
   </head>  
   <body>  
<div>
<form id="form1" runat="server">
 
   <asp:TextBox ID="TextBox1" runat="server" Height="180px" Style="left: 307px; position: relative;  
       top: 264px" TextMode="MultiLine" Width="432px"></asp:TextBox>
    <asp:Button ID="Button1" runat="server"  
        Text="Button" OnClientClick=" return drawDiv()"  />  
</form>
</div> 
   </body>  
   </html>  


please run this code and make it cross browser. also tell me why the content in div is not vertically centered.

thanks
tbhattacharjee

Questionhow to position div just over the textbox? Pin
Tridip Bhattacharjee13-Nov-10 20:30
professionalTridip Bhattacharjee13-Nov-10 20:30 
AnswerRe: how to position div just over the textbox? Pin
Brij13-Nov-10 22:22
mentorBrij13-Nov-10 22:22 
GeneralRe: how to position div just over the textbox? Pin
Tridip Bhattacharjee13-Nov-10 22:49
professionalTridip Bhattacharjee13-Nov-10 22:49 
GeneralRe: how to position div just over the textbox? Pin
Brij13-Nov-10 23:52
mentorBrij13-Nov-10 23:52 
QuestionHow to pass data to gridview(Long Post) Pin
future383913-Nov-10 13:46
future383913-Nov-10 13:46 
AnswerRe: How to pass data to gridview(Long Post) Pin
thatraja15-Nov-10 1:47
professionalthatraja15-Nov-10 1:47 
QuestionWhat is best way to show Grid inside a TabPanel Pin
Steve van Niman13-Nov-10 11:26
Steve van Niman13-Nov-10 11:26 
QuestionHost Web Service and Web Site in virtual directory & app pool Pin
kakarato13-Nov-10 5:06
kakarato13-Nov-10 5:06 
AnswerRe: Host Web Service and Web Site in virtual directory & app pool Pin
Brij13-Nov-10 7:14
mentorBrij13-Nov-10 7:14 
Questionmultiple getJSON issue [modified] Pin
musefan12-Nov-10 5:28
musefan12-Nov-10 5:28 
QuestionFail to avoid postback for button click Pin
Tridip Bhattacharjee11-Nov-10 23:01
professionalTridip Bhattacharjee11-Nov-10 23:01 
AnswerRe: Fail to avoid postback for button click Pin
Brij12-Nov-10 1:12
mentorBrij12-Nov-10 1:12 
GeneralRe: Fail to avoid postback for button click Pin
Tridip Bhattacharjee12-Nov-10 2:00
professionalTridip Bhattacharjee12-Nov-10 2:00 
GeneralRe: Fail to avoid postback for button click Pin
Brij12-Nov-10 6:38
mentorBrij12-Nov-10 6:38 
QuestionShowing content pages without MasterPage in DesignView. Pin
Asif Rehman11-Nov-10 4:03
Asif Rehman11-Nov-10 4:03 
AnswerRe: Showing content pages without MasterPage in DesignView. Pin
Brij11-Nov-10 6:32
mentorBrij11-Nov-10 6:32 
AnswerRe: Showing content pages without MasterPage in DesignView. Pin
Vimalsoft(Pty) Ltd14-Nov-10 20:03
professionalVimalsoft(Pty) Ltd14-Nov-10 20:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.