pankaj_it09
02-17-2007, 08:42 AM
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/tps/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.
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 .= "<tr>";
$str .= "<td class=\"plogitemselectable\"><a href=
\"#placeanchor\" onClick=\"getHTML($selectlist[$i]{'conid'});\">
$selectlist[$i]{'conid'}</a></td>";
$str .= "<td class=\"plogitemselectable\">$selectlist[$i]
{'arriveDate'}</td>";
$str .= "<td class=\"plogitemselectable\">$selectlist[$i]
{'dbname'}</td>";
$str .= "<td class=\"plogitemselectable\">$selectlist[$i]
{'startDate'}</td>";
$str .= "<td class=\"plogitemselectable\">$selectlist[$i]
{'expiryDate'}</td>";
$str .= "<td class=\"plogitemselectable\">$selectlist[$i]
{'status'}</td>";
$str .= "</tr>";
}
$str .= "</tbody>";
$str .= "</table>";
print $str;
Please tell me what to do so that the JS code runs in IE also ?
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/tps/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.
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 .= "<tr>";
$str .= "<td class=\"plogitemselectable\"><a href=
\"#placeanchor\" onClick=\"getHTML($selectlist[$i]{'conid'});\">
$selectlist[$i]{'conid'}</a></td>";
$str .= "<td class=\"plogitemselectable\">$selectlist[$i]
{'arriveDate'}</td>";
$str .= "<td class=\"plogitemselectable\">$selectlist[$i]
{'dbname'}</td>";
$str .= "<td class=\"plogitemselectable\">$selectlist[$i]
{'startDate'}</td>";
$str .= "<td class=\"plogitemselectable\">$selectlist[$i]
{'expiryDate'}</td>";
$str .= "<td class=\"plogitemselectable\">$selectlist[$i]
{'status'}</td>";
$str .= "</tr>";
}
$str .= "</tbody>";
$str .= "</table>";
print $str;
Please tell me what to do so that the JS code runs in IE also ?