Free Web Hosting Forum
Go Back   Free Web Hosting Forum > 000WebHost Services > Customer Assistance
Reload this Page Javascript error on this server but not on IIS
Reply
 
Thread Tools Display Modes
(#1)
Old
aipragma aipragma is offline
Junior Member
aipragma is on a distinguished road
 
Posts: 2
Join Date: Apr 2011
Exclamation Javascript error on this server but not on IIS - 04-20-2011, 01:42 AM

Running IE, I get the following errors for the following webpage:
http://eng3303.comoj.com/register.html

=============================================
Message: Unknown runtime error
Line: 135
Char: 9
Code: 0
URI: http://eng3303.comoj.com/secure/libs/js/ajax.js

Message: Expected ')'
Line: 197
Char: 13
Code: 0
URI: http://eng3303.comoj.com/secure/libs/js/ajax.js
=============================================
in the following javascript code:
the above errors are associated with functions below respectively,
i.e. line 135 is in first function and line 197 is in second function
the line number is commented at the end of that line...


function Ajax_PhpResultsWithVar(fname,elementID,varpassed,v alue){
var ajaxRequest;
ajaxRequest = Ajax_XMLHttpRequest_Factory();

if (ajaxRequest) {
ajaxRequest.onreadystatechange = function() {
if (ajaxRequest.readyState == 4) {
if (ajaxRequest.status == 200) {
var ajaxDisplay = document.getElementById(elementID);
alert(fname+" :: "+elementID+" :: "+varpassed+" :: "+value);
if (ajaxDisplay) {
ajaxDisplay.innerHTML = trim(ajaxRequest.responseText);//line135
}
}
}
}
ajaxRequest.open("GET", fname + "?" + varpassed + "=" + value, true);
ajaxRequest.send();
}
}


function Ajax_RunPhpWithFunc(fname,elementID){
var ajaxRequest= Ajax_XMLHttpRequest_Factory();

ajaxRequest.onreadystatechange = function() {
if(ajaxRequest.readyState == 4) {
var evalStr = "var dataArr = new Array(" + trim(ajaxRequest.responseText) + ")";
//alert(evalStr);
eval(evalStr); //line197 and char 13 is at beginning of 'eval'
//
for (var i = 0; i < dataArr.length; i++) {
var t = document.createElement("option");
//
t.value = dataArr[i].value;
t.innerHTML = dataArr[i].text;
document.getElementById(elementID).appendChild(t);
}
}
}
ajaxRequest.open("GET", fname, true);
ajaxRequest.send();
}

================================================

The alert in Ajax_PhpResultsWithVar() displays the following:
"./secure/db/SummaryFromICalCls.php :: ta_evt_desc :: dateval :: today"

================================================

As I mentioned in the title of the posting, this works on IIS (locally), and another linux-based domain server not belonging to 000webhost.com, but it fails on this domain server (comoj.com) belonging to 000webhost.com.

=================================================

For those going to ask, I did try using firefox, and it does get further than IE, i.e., posting a value in the event description textbox, but along with that value is some kind of analytics html:
<!-- www.000webhost.com Analytics Code -->
<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
<noscript><a href="http://www.hosting24.com/"><img src="http://analytics.hosting24.com/count.php" alt="web hosting" /></a></noscript>
<!-- End Of Analytics Code -->

but the register date dropdown doesnt get filled.
==================================================

Im at a loss to understand what is going on here...

Thanks for any assistance in understanding what is going on here...

Edward
Reply With Quote
(#2)
Old
drums's Avatar
drums drums is offline
Senior Member
drums is on a distinguished road
 
Posts: 579
Join Date: Aug 2010
Location: Oz
Default 04-20-2011, 05:58 AM

It looks like the 000webhost analytics code might be causing problems.

Try turning it off by entering your details here:
http://members.000webhost.com/analytics.php

Let us know if that helps.

drums
Reply With Quote
(#3)
Old
aipragma aipragma is offline
Junior Member
aipragma is on a distinguished road
 
Posts: 2
Join Date: Apr 2011
Default 04-20-2011, 07:25 AM

Thanks drums... that did it... it works now...

Thanks again...

Edward
Reply With Quote
Reply

Tags
ajax, javascript, linux

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com