Click here to Skip to main content
15,895,709 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: How to stream webcam to a browser Pin
smorris1015-Jun-09 15:44
smorris1015-Jun-09 15:44 
GeneralRe: How to stream webcam to a browser Pin
Christian Graus15-Jun-09 16:05
protectorChristian Graus15-Jun-09 16:05 
AnswerRe: How to stream webcam to a browser Pin
Marc Firth15-Jun-09 23:43
Marc Firth15-Jun-09 23:43 
AnswerRe: How to stream webcam to a browser Pin
alexferri00116-Jun-09 3:53
professionalalexferri00116-Jun-09 3:53 
QuestionRegarding website Pin
dayakar_dn15-Jun-09 2:37
dayakar_dn15-Jun-09 2:37 
AnswerRe: Regarding website Pin
Baran M15-Jun-09 2:43
Baran M15-Jun-09 2:43 
QuestionFulltext Search on localized Website Pin
Marcel Härry15-Jun-09 1:27
Marcel Härry15-Jun-09 1:27 
QuestionProblem with simple AJAX script Pin
abhshk.btra14-Jun-09 23:34
abhshk.btra14-Jun-09 23:34 
I was trying out the code given below, taken from a book, but it is not able to show contents of data.txt in the <div> specified.
<html>
<head>
     <title>Gmail</title>

     <script language="javascript">
          var XMLHttpRequestObject = false;
          if(window.XMLHttpRequest)
          {
               XMLHttpRequestObject = new XMLHttpRequest();
          }
          else if(window.ActiveXObject)
          {
               XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHTTP");
          }

          function getData(dataSource, divID)
          {
               if(XMLHttpRequestObject)
               {
                    var obj = document.getElementById(divID);
                    XMLHttpRequestObject.open("GET", dataSource);
                    XMLHttpRequestObject.onreadystatechange = function()
                    {
                         if(XMLHttpRequestObject.readyState == 4 && XMLHttpRequestObject.status == 200)
                         {
                              obj.innerHTML = XMLHttpRequestObject.responseText;
                         }
                    }
                    XMLHttpRequetObject.send(null);
               }
          }
     </script>
</head>

<body>
     <form>
          <input type="button" value="Fetch the message" onclick="getData('data.txt', 'targetDiv')">
     </form>

     <div id="targetDiv">
          <p>Fetched message to appear here.</p>
     </div>
</body>
</html>
The file, data.txt exists in the same directory as the file containing the code. Someone please tell me what could be wrong with the script.
Thanks
AnswerRe: Problem with simple AJAX script Pin
himanshu256115-Jun-09 2:13
himanshu256115-Jun-09 2:13 
GeneralRe: Problem with simple AJAX script Pin
abhshk.btra15-Jun-09 2:25
abhshk.btra15-Jun-09 2:25 
AnswerRe: Problem with simple AJAX script Pin
Baran M15-Jun-09 2:27
Baran M15-Jun-09 2:27 
GeneralRe: Problem with simple AJAX script Pin
abhshk.btra15-Jun-09 2:33
abhshk.btra15-Jun-09 2:33 
GeneralRe: Problem with simple AJAX script Pin
Baran M15-Jun-09 2:42
Baran M15-Jun-09 2:42 
GeneralRe: Problem with simple AJAX script Pin
abhshk.btra15-Jun-09 3:46
abhshk.btra15-Jun-09 3:46 
GeneralRe: Problem with simple AJAX script Pin
Sabari MD13-Jul-09 19:59
Sabari MD13-Jul-09 19:59 
Questionjava web service client error. Pin
hussain@78613-Jun-09 0:03
hussain@78613-Jun-09 0:03 
Questionimage transfer Pin
nigel200012-Jun-09 9:28
nigel200012-Jun-09 9:28 
AnswerRe: image transfer Pin
Christian Graus13-Jun-09 13:17
protectorChristian Graus13-Jun-09 13:17 
GeneralRe: image transfer Pin
nigel200013-Jun-09 23:09
nigel200013-Jun-09 23:09 
AnswerRe: image transfer Pin
saanj13-Jun-09 22:49
saanj13-Jun-09 22:49 
QuestionSending html form to email using asp.net Pin
Lodeclaw12-Jun-09 5:20
Lodeclaw12-Jun-09 5:20 
QuestionRe: Sending html form to email using asp.net Pin
led mike12-Jun-09 5:40
led mike12-Jun-09 5:40 
AnswerRe: Sending html form to email using asp.net Pin
Lodeclaw12-Jun-09 5:45
Lodeclaw12-Jun-09 5:45 
GeneralRe: Sending html form to email using asp.net Pin
led mike12-Jun-09 6:07
led mike12-Jun-09 6:07 
GeneralRe: Sending html form to email using asp.net Pin
Lodeclaw12-Jun-09 6:17
Lodeclaw12-Jun-09 6:17 

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.