Results 1 to 2 of 2

Thread: css rule background:url...(img) is applied to <a> object , this always place the imag

  1. #1
    Join Date
    Oct 2004
    Posts
    425
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default css rule background:url...(img) is applied to <a> object , this always place the imag

    HEAD FIRST AJAX ©2008
    css rule background:url
    In page 120 : in css rule background:url...(img) is applied to <a> object , this always place the image in place of link <a> ?
    Code:
    #navigation a#beginners {
      background: url('../images/beginnersBtn.png') no-repeat;
    }
    #navigation a#beginners.active {
      background: url('../images/beginnersBtnActive.png') no-repeat;
    }
    Ajax
    In page 129 : if file in Ajax:...request.open(....file.html....), file.html, does NOT exist on server we get error or NOTHING("") in responseText?
    Code:
    function showSchedule() {
      if (request.readyState == 4) {
        if (request.status == 200) {
          document.getElementById("content").innerHTML = request.responseText;
        }
      }
    }

  2. #2
    Join Date
    Jul 2009
    Location
    Coquitlam BC Canada
    Posts
    46
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default

    For ajax:

    I think it results in a nothing situation because it won't get into the |if status == 200 | part as it returns a 404, not 200.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •