WEB HTML, CSS, JavaScript, XML people help me please :(

Discussion in 'OT Technology' started by White Stormy, Apr 19, 2008.

  1. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
    I'm trying to load a txt file into an html doc using js and xml..

    when I load the page.. nothing happens. I can't tell if the problem is with my CSS or something else


    the quickest way you can see the problem..
    go here: http://www.w3schools.com/ajax/tryit.asp?filename=tryajax_httprequest_js1

    near the bottom, change the
    Code:
    <body onload="loadXMLDoc('test_xmlhttp.txt')">
    
    line to
    Code:
    <body onload="loadXMLDoc('http://brahma.cs.gsu.edu/~hale/_feed/news.txt')">
    
    this is the content of http://brahma.cs.gsu.edu/~hale/_feed/news.txt
    but it loads blank.

    permissions for the textfile are completely open, so I know that's not it.
     
  2. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
    I think maybe I'm using the URL wrong?
     
  3. Chimpa Codigo

    Chimpa Codigo Bаnned bу Ѕuреr Modulators

    Joined:
    Jan 27, 2001
    Messages:
    68,463
    Likes Received:
    21
    Location:
    Salinas, CA
    link to online testing page?
     
  4. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
    I got it working.. I was only trying it locally and hadn't tried putting it on the site. I put it on the site and it worked right away :uh:

    I guess it was doing more server-side than I thought and my comp couldn't handle it
     
  5. Chimpa Codigo

    Chimpa Codigo Bаnned bу Ѕuреr Modulators

    Joined:
    Jan 27, 2001
    Messages:
    68,463
    Likes Received:
    21
    Location:
    Salinas, CA
    :o
    glad I could help
     
  6. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
    :o

    can you tell me why the copyright and email at the bottom aren't centering properly?

    http://brahma.cs.gsu.edu/~hale/


    html
    Code:
    <body>
    		<div class="footerbg">
    			<div class="footer">
    					<br />
    					Copyright © 2008 Jonathan Hale.
    					<br />
    					<img src="_res/email.gif" alt="email">
    			</div>
    		</div>
    </body>
    
    css
    Code:
    body {
        background-color: #666666;
        background-image: url(../_res/background.gif);
        background-repeat: repeat-x;
        margin: 0;
        padding: 0;
        text-align: center;
        font-family: verdana, arial, helvetica, sans-serif;
        font-size: 0.7em;
        color: #666666;
    }
    
    .footerbg {
    	background-image: url(../_res/footer-side.gif);
    	background-repeat: repeat-x;
    	width: auto;
    	height: 75px;
    	text-align: center;
    }
    .footer {
    	background-image: url(../_res/footer.gif);
    	background-repeat: no-repeat;
    	margin-left: auto;
    	margin-right: auto;
    	width: 760px;
    	height: 75px;
    	text-align: center;
    	font-size: 10px;
    }
    
     
  7. Browning

    Browning Active Member

    Joined:
    Feb 14, 2005
    Messages:
    89,465
    Likes Received:
    10
    Code:
    <body>
            <div class="footerbg">
                <div class="footer">
                        <br />
                        <center>
                        Copyright © 2008 Jonathan Hale.
                        <br />
                        <img src="_res/email.gif" alt="email">
                        </center>
                </div>
            </div>
    </body>
    :mamoru:
     
  8. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
    :squint: that doesn't work.

    I think it's inheriting something from a div above it and centering to that.. but I don't know what, how, or why
     
  9. pkr

    pkr Guest

    Shoot me a PM. I fixed it for ya
     
  10. Chimpa Codigo

    Chimpa Codigo Bаnned bу Ѕuреr Modulators

    Joined:
    Jan 27, 2001
    Messages:
    68,463
    Likes Received:
    21
    Location:
    Salinas, CA
    :noes: there's some issues with your width in ie7 :noes: i hate cross browser checking
     
  11. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
    yeah..

    I'm doing this as a project for a class, but it's a personal site that I've wanted to for about a year, so I'm putting a lot more effort into it than I really need to.

    luckily, though, I know my prof will only check it in firefox, so I don't need to worry about stuff like that right now :rofl:
     
  12. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
    holy crap, guys, this whole thing with loading one file into another is fucking awesome :rofl:
     
  13. biawokauns

    biawokauns New Member

    Joined:
    Sep 18, 2001
    Messages:
    19,893
    Likes Received:
    0
    Location:
    Republic of Kalifornia
    you can combine a lot of shit

    Code:
          <div class="footerbg">
                <div class="footer">
                        <br />
                        <center>
                        Copyright © 2008 Jonathan Hale.
                        <br />
                        <img src="_res/email.gif" alt="email">
                        </center>
                </div>
            </div>
    
    you should also escape your symbols and close your img tag, since it is self closing
    Code:
          <div id="footer">
                        Copyright &copy; 2008 Jonathan Hale.<br />
                        <img src="_res/email.gif" alt="email" />
            </div>
    
    any why are you using body onload to load your txt file..if you're on ASP...why not <!--#include file="filename"-->?
     
  14. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
    pkr fixed it, btw :big grin:
     
  15. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
    yeah you can see where I did escape a lot but forgot some.

    no longer on ASP.. that's the point of going back and doing everything from scratch :)
     
  16. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
    and I'm not worried about using white space, that's free. and it helps me to have it formatted like C code
     

Share This Page