dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 1 of 1

Thread: Elements not displaying corectly

  1. #1
    Join Date
    May 2007
    Posts
    4

    Elements not displaying corectly

    Hello. I have a page and I decided I don't want it to completely refresh every time the user hits a link. So I decided in using AJAX. So I set up an XmlHTTPRequest object, no problem with that, and I fetch a page, like so.
    Code:
    ajaxRequest.onreadystatechange=function()
    {
    	if(ajaxRequest.readyState==4)
    	{		
    		document.getElementById("main_space").innerHTML="";
    		document.getElementById("main_space").innerHTML=ajaxRequest.responseText;
    	}
    }
    "main_space" is a <tr> on my page and the pages that get called contain some <td>'s . So far so good. Here is how my called page looks like after stripping every non-essential information.
    Code:
    <td height="400" id="td_left" style="border-left:1px solid #2F2F2F; border-bottom:1px solid #2F2F2F;">
    &nbsp;
    </td>
    <td width="64%" id="td_right">
    &nbsp;
    </td>
    And here is how a stripped css file looks like
    Code:
    #td_left
    {
    	border-left:1px solid #2F2F2F;
    	border-right:1px solid #2F2F2F;
    	padding-left:10px;
    	vertical-align:top;
    }
    The problem is that the borders don't show up. Can you please help me? Thank you.

    Edit:
    It's not about ajax, if I just say
    Code:
    document.getElementById("main_space").innerHTML='<td height="400" id="td_left" style="border-left:1px solid #2F2F2F; border-bottom:1px solid #2F2F2F;">
    &nbsp;
    </td>
    <td width="64%" id="td_right">
    &nbsp;
    </td>';
    it fails to display the borders
    Last edited by nc3b; 11-29-2007 at 10:10 AM.

Similar Threads

  1. Replies: 1
    Last Post: 11-19-2007, 12:52 PM
  2. Replies: 3
    Last Post: 11-16-2007, 08:05 AM
  3. XSL Help - Displaying Output In A Table
    By h4x0rz3d in forum XML
    Replies: 0
    Last Post: 11-03-2006, 06:50 AM
  4. Replies: 2
    Last Post: 12-27-2005, 02:39 AM
  5. xml attributes vs. elements
    By monife in forum XML
    Replies: 1
    Last Post: 01-30-2001, 01:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center