Print Page | Close Window

comment_form.js

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz NewsPad
Forum Description: Support forum for the Web Wiz NewsPad application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=29911
Printed Date: 29 March 2026 at 12:33pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: comment_form.js
Posted By: Roberto Randall
Subject: comment_form.js
Date Posted: 26 October 2011 at 9:13pm

With this change (120000) still gives an error, but goes away after loading the page.

 I've seen in the file "comment_form.js" has the same code that is in "default_javascript.js." What changes is a "2".

 If post.asp change the word "getAjaxData2" and write "getAjaxData" works well and is the same code that has "Web Wiz forum."

 I see that the file "comment_form.js" is useless if you use the original code used by the forum and exists in "Web Wiz Newspad" writing "getAjaxData."



-------------
https://www.lanocion.es - https://www.lanocion.games - https://www.lanocion.chat



Replies:
Posted By: Roberto Randall
Date Posted: 26 October 2011 at 9:25pm
I have also seen in "comment_form.js" (may be I'm wrong) that the following function is missing or left over "2" (XMLHttpRequest2 or XMLHttpRequest).
 
 
//create XMLHttpRequest object
function createXMLHttpRequest2(){
 if (window.XMLHttpRequest){
  xmlHttp2 = new XMLHttpRequest();
 }else if (window.ActiveXObject){
  xmlHttp2 = new ActiveXObject('Msxml2.XMLHTTP');
  if (! xmlHttp2){
   xmlHttp2 = new ActiveXObject('Microsoft.XMLHTTP');
  }
 }
}


-------------
https://www.lanocion.es - https://www.lanocion.games - https://www.lanocion.chat


Posted By: WebWiz-Bruce
Date Posted: 27 October 2011 at 9:57am
It's done like this by design and I would recommend not changing it or you could break functions of NewsPad.

The reason for using two AJAX functions is that some pages have more than one feature that uses AJAX. If you have a single AJAX function if it is called while another AJAX call is being carried out it will crash the AJAX call.

To prevent this some AJAX features use the XMLHttpRequest function while others use XMLHttpRequest2. This then prevents conflicts if both features make an AJAX call at the same time.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: Roberto Randall
Date Posted: 27 October 2011 at 2:28pm
I do not understand is why the code "comment_form.js" an error while loading the page and the code of "default_javascript.js" gives no error. The two codes are the same just change "2".


-------------
https://www.lanocion.es - https://www.lanocion.games - https://www.lanocion.chat


Posted By: WebWiz-Bruce
Date Posted: 27 October 2011 at 2:49pm
There is an error that has been fixed for the next release on line 25 of comment_form.js which should be as below to prevent an error in the event handler:-

if (xmlHttp2.readyState == 4 || xmlHttp2.readyState=='complete'){


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net