AJAX Quick Reply Problem

  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8416
  • Loc: USA

Post 3+ Months Ago

I have a problem with an AJAX chat thing... I got it from an Abandoned AJAX Chat Post in phpBB, and the only problem was that it broke the style in Firefox when the quick reply is submitted... well, I have fixed that issue and came across another one... it doesn't work in IE at all...

IE thinking that it knows better about how JavaScript should be run throws the following error!
Quote:
Line: 454
Char: 1
Error: Object Expected
Code: 0
URL: Look below


About the URL thing... it happens on every topic page where I can use the AJAX quick reply...

Line 454 is:
Code: [ Select ]
    <form action="javascript&#058;void(0);" method="post" id="postform" onsubmit="get(this);" name="postform">


If you need more information to help me, than that would be great :D
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8416
  • Loc: USA

Post 3+ Months Ago

I removed the permission for guests to see the bottom chat bar...

You can still see it and actually use it by using my test member I created for this specific reason.


Username: Test_User
Password: demo101
  • PolishHurricane
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1585

Post 3+ Months Ago

Does it have anything to do with the HTML entity for a colon being where a colon should be? I don't see your URL anywhere in this topic at the time of this posting.
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8416
  • Loc: USA

Post 3+ Months Ago

Sorry, http://www.wedevoy.com I seem to leave out important information when asking for help :lol:
  • PolishHurricane
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1585

Post 3+ Months Ago

Is that the exact URL of whatever you're having trouble with?? I don't see it in the source code.
  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Posts: 2733
  • Loc: Nashville, TN

Post 3+ Months Ago

Hrmm, I don't see it either. I managed to log in, but I don't see the chat piece that you've mentioned, Bogey.
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8416
  • Loc: USA

Post 3+ Months Ago

Ooops, I mean quick reply, just navigate to a topic while your logged in... I disabled the chat thing, must have had that thing on my mind when I was posting this.
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8416
  • Loc: USA

Post 3+ Months Ago

If this helps you any... the JavaScript is:
JAVASCRIPT Code: [ Select ]
<script type="text/javascript">
-->
var fieldname = 'postrowbody';
var xmlHttp = http_object();
 
function get(f)
{
   var param = elem = '';
   for(var s = 0; s < f.elements.length; s++)
   {
      elem = f.elements[s];
      if(param != '')
      {
         param += '&';
      }
      param += elem.name + '=' + elem.value;
   }  
   xmlHttp.onreadystatechange = handle_return;
   xmlHttp.open("POST", '{S_AJAX_ACTION}', true);
   xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
   xmlHttp.send(param);
   
   //clear the message site
   document.postform.message.value = '';
}
 
function handle_return()
{
   if (xmlHttp.readyState == 4)
   {
      document.getElementById(fieldname).innerHTML += xmlHttp.responseText;
   }
}
 
function http_object()
{
   try
   {
      // Firefox, Opera 8.0+, Safari
      xmlHttp = new XMLHttpRequest();
   }
   catch (e)
   {
      // Internet Explorer
      try
      {
         xmlHttp = new ActiveXObject('Msxml2.XMLHTTP');
      }
      catch (e)
      {
         try
         {
            xmlHttp = new ActiveXObject('Microsoft.XMLHTTP');
         }
         catch (e)
         {
            alert("Your browser does not support AJAX!");
            return false;
         }
      }
   }
   return xmlHttp;
}
-->
</script>
  1. <script type="text/javascript">
  2. -->
  3. var fieldname = 'postrowbody';
  4. var xmlHttp = http_object();
  5.  
  6. function get(f)
  7. {
  8.    var param = elem = '';
  9.    for(var s = 0; s < f.elements.length; s++)
  10.    {
  11.       elem = f.elements[s];
  12.       if(param != '')
  13.       {
  14.          param += '&';
  15.       }
  16.       param += elem.name + '=' + elem.value;
  17.    }  
  18.    xmlHttp.onreadystatechange = handle_return;
  19.    xmlHttp.open("POST", '{S_AJAX_ACTION}', true);
  20.    xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
  21.    xmlHttp.send(param);
  22.    
  23.    //clear the message site
  24.    document.postform.message.value = '';
  25. }
  26.  
  27. function handle_return()
  28. {
  29.    if (xmlHttp.readyState == 4)
  30.    {
  31.       document.getElementById(fieldname).innerHTML += xmlHttp.responseText;
  32.    }
  33. }
  34.  
  35. function http_object()
  36. {
  37.    try
  38.    {
  39.       // Firefox, Opera 8.0+, Safari
  40.       xmlHttp = new XMLHttpRequest();
  41.    }
  42.    catch (e)
  43.    {
  44.       // Internet Explorer
  45.       try
  46.       {
  47.          xmlHttp = new ActiveXObject('Msxml2.XMLHTTP');
  48.       }
  49.       catch (e)
  50.       {
  51.          try
  52.          {
  53.             xmlHttp = new ActiveXObject('Microsoft.XMLHTTP');
  54.          }
  55.          catch (e)
  56.          {
  57.             alert("Your browser does not support AJAX!");
  58.             return false;
  59.          }
  60.       }
  61.    }
  62.    return xmlHttp;
  63. }
  64. -->
  65. </script>
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8416
  • Loc: USA

Post 3+ Months Ago

11 Days later and still no replies :(

I still need a solution to this.

Post Information

  • Total Posts in this topic: 9 posts
  • Users browsing this forum: No registered users and 81 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.