1753947 Members
7621 Online
108811 Solutions
New Discussion юеВ

AJAX Problem

 
SOLVED
Go to solution
Pankaj Yadav_1
Frequent Advisor

AJAX Problem

Hello,

I am using Prototype.js to implement Ajax.

My JS code is -->

function getHTML(num) {
var saf = 0 ;
var num;
if(!num) {
num = document.getElementById('refid').value;
} else {
num = num;
}
var url = '/cgi-bin/ttps/search.cgi';
var pars = 'num='+num+'&showallfiles='+saf
+'&act=showattachedfilesection';
var myAjax = new Ajax.Updater( {success: 'placeholder'}, url,
{method: 'get', parameters: pars, onFailure: reportError });
}

The above code works fine in Firefox but not in IE.

Please tell me what to do ?
2 REPLIES 2
Pankaj Yadav_1
Frequent Advisor

Re: AJAX Problem

What happens in IE ?

The getHTML function is invoked when I click on a link.
When I click on a link the function is called and processing happens
but never stops.

How I know that processing happens ?
By the following code -->

var myGlobalHandlers = {
onCreate: function(){
Element.show('systemWorking');
},
onComplete: function() {
if(Ajax.activeRequestCount == 0){
Element.hide('systemWorking');
}
}
};
Ajax.Responders.register(myGlobalHandlers);


Here is the Perl code which creates the variable $str and returns to
another Ajax(not above) and a placeholder is replaced by the data
below. Notice the getHTML function below.-->

my $i;
foreach $i (0 ..$#selectlist) {
$str .= "";
$str .= "\"#placeanchor\" onClick=\"getHTML($selectlist[$i]{'conid'});\">
$selectlist[$i]{'conid'}
";
$str .= "$selectlist[$i]
{'arriveDate'}";
$str .= "$selectlist[$i]
{'dbname'}";
$str .= "$selectlist[$i]
{'startDate'}";
$str .= "$selectlist[$i]
{'expiryDate'}";
$str .= "$selectlist[$i]
{'status'}";
$str .= "";
}
$str .= "";
$str .= "";
print $str;


Hoff
Honored Contributor
Solution

Re: AJAX Problem

Welcome to the wonderful world of browser differences. There are a whole lot of these. Just with CSS and HTML. And certainly with JavaScript. Beyond client-side differences, there are also client-side oddities and even attacks as you have no control over the JavaScript environment. Bad guys can have their own JavaScript engines.

As for your specific question, and respectfully, this looks rather like a Microsoft question, and not an OpenVMS question. (You're not running the JavaScript code on OpenVMS here, you're running it within Microsoft Internet Explorer. Yes, the JavaScript can be stored on and loaded from OpenVMS. Or Unix. Or most anything.)

Probably the best forum available here at ITRC might be the Microsoft Internet Tools area http://forums1.itrc.hp.com/service/forums/categoryhome.do?categoryId=181

And do take a look at the Microsoft (Java)Script Debugger tool
http://blogs.msdn.com/ie/archive/2004/10/26/247912.aspx as this tool might tell you what your JavaScript is really doing inside the Microsoft Internet Explorer (Java)Script Engine. I expect there are other debuggers around.

Stephen Hoffman
HoffmanLabs

--

FWIW: The ITRC Forums JavaScript for the forums themselves isn't working on the local Firefox. hpweb_utilities.js is throwing errors.