Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - comment_form.js
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum Lockedcomment_form.js

 Post Reply Post Reply
Author
Roberto Randall View Drop Down
Senior Member
Senior Member
Avatar

Joined: 21 August 2009
Location: San Pedro Alc.
Status: Offline
Points: 277
Post Options Post Options   Thanks (0) Thanks(0)   Quote Roberto Randall Quote  Post ReplyReply Direct Link To This Post Topic: comment_form.js
    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
Back to Top
Roberto Randall View Drop Down
Senior Member
Senior Member
Avatar

Joined: 21 August 2009
Location: San Pedro Alc.
Status: Offline
Points: 277
Post Options Post Options   Thanks (0) Thanks(0)   Quote Roberto Randall Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Roberto Randall View Drop Down
Senior Member
Senior Member
Avatar

Joined: 21 August 2009
Location: San Pedro Alc.
Status: Offline
Points: 277
Post Options Post Options   Thanks (0) Thanks(0)   Quote Roberto Randall Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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'){
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.