Advertisement

04.19.2007 at 03:44PM PDT, ID: 22522754
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.8

Problem with Loading html into div HELP HELP HELP

Asked by mrwilde in JavaScript

Tags: , ,

First if this is obviouse to som I am sorry as I am just starting with Javasript and ajax

I have created a simple page for a web site that replaces the text DIV with html from template pages to give a clen insertion and no page loads.

CODE------

// AJAX Send
function AjaxLoad(page_url, div_id)
{
      // register the callbacks
      var local_handle_reply = handle_reply;
      var local_handle_error = handle_error;

      // callback binder
      function bindcallback()
      {
            if (req.readyState == 4) {
                  if (req.status == 200) {
                        TEST:local_handle_reply(req.responseText, div_id);
                        //handle_reply();
                  } else {
                        local_handle_error(req);
                  }
            }
      }

      // send request to the server
      if (window.XMLHttpRequest)
      {
            //native XMLHttpRequest browsers
            var req = new XMLHttpRequest();
            req.onreadystatechange = bindcallback;
            req.open("GET", page_url, true);
            req.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
            req.send('');
      }
      
      else if (window.ActiveXObject)
      {
            // IE/Windows ActiveX browsers
            var req = new ActiveXObject("Microsoft.XMLHTTP");
            if (req)
            {
                  req.onreadystatechange = bindcallback;
                  req.open("GET", page_url, true);
                  //req.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
                  req.send('');
            }
      }
      return "done";
}

// AJAX handle_reply
function handle_reply(reply, div_id)
{
      document.getElementById(div_id).innerHTML = reply;

      // clean up
      delete(reply);
}      
      


// AJAX handle_error
function handle_error(req)
{

}

CODE ----

I have wampserver installed localy on my machine running

PHP Version 5.2.1

System       Windows NT COMPAQ 5.1 build 2600
Build Date       Feb 7 2007 23:10:31
Configure Command       cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared"
Server API       Apache 2.0 Handler
Virtual Directory Support       enabled
Configuration File (php.ini) Path       C:\wamp\Apache2\bin\php.ini
PHP API       20041225
PHP Extension       20060613
Zend Extension       220060519
Debug Build       no
Thread Safety       enabled
Zend Memory Manager       enabled
IPv6 Support       enabled
Registered PHP Streams       php, file, data, http, ftp, compress.zlib
Registered Stream Socket Transports       tcp, udp
Registered Stream Filters       convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, zlib.*


it works fine exactly as planned. BUT I upload to my web server witch is running

PHP Version 4.4.4

System       Linux universe.websiteactive.com 2.6.18.2-ts.grh.mh.i386 #1 SMP Sat Nov 18 04:56:38 CST 2006 i686
Build Date       Aug 28 2006 07:25:30
Configure Command       './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--prefix=/usr/local' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--enable-exif' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--with-iconv' '--with-imap=/usr/local/imap-2004g' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--with-mhash' '--enable-magic-quotes' '--with-mysqli' '--with-mysql=/usr' '--with-openssl' '--enable-discard-path' '--with-pear' '--with-pspell' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-wddx' '--with-zip' '--with-zlib'
Server API       Apache
Virtual Directory Support       disabled
Configuration File (php.ini) Path       /usr/local/Zend/etc/php.ini
PHP API       20020918
PHP Extension       20020429
Zend Extension       20050606
Debug Build       no
Zend Memory Manager       enabled
Thread Safety       disabled
Registered PHP Streams       php, http, ftp, https, ftps, compress.zlib

and nothing happens. There are no errors no warnings nothing it just dont work

WHAT AM I MISSING HERE.  PLEASE HELP

and nothingStart Free Trial
 
Loading Advertisement...
 
[+][-]04.19.2007 at 04:03PM PDT, ID: 18942982

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: JavaScript
Tags: div, html, load
Sign Up Now!
Solution Provided By: Cyber-Drugs
Participating Experts: 1
Solution Grade: B
 
 
[+][-]04.19.2007 at 04:43PM PDT, ID: 18943143

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.19.2007 at 04:50PM PDT, ID: 18943170

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.19.2007 at 05:06PM PDT, ID: 18943235

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.19.2007 at 05:14PM PDT, ID: 18943258

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.19.2007 at 05:15PM PDT, ID: 18943264

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44