It applears that CFHTTP is not retrieving javascript from a page, i.e., code
between the curly brackets {} is mysteriously missing.  The source with and
without CFHTTP is shown below:
 
I am using CFHTTP (CF5) to grab a page but receive the following script
error:
 
<p>Microsoft JScript runtime </font> <font face="Arial" size=2>error
'800a138f'</font>
<p>
<font face="Arial" size=2>'exec(...).0' is not an object</font>
<p>
<font face="Arial" size=2>/static_top_menus.inc</font><font face="Arial"
size=2>, line 72</font> 
 
I am able to retrieve the file fine in my browser.  I then viewed the source
for both attempts and found that
the CFHTTP retrieved snippet looked like this:
 
function highlighted(menu, image){}
 function SwapImageOn(menu){} 
 function SwapImageOff(menu){}
 function TurnSubOn(sectionname) {}
 function TurnSubOff() {}
 function TurnSideSubOn(sectionname) {}
 function TurnSideSubOff() {}
 
  function windowLoaded() {}
 
 
 
While the same snippet loaded by the browser looked like this:
 

/* ********************************************
 * ROLLOVER FUNCTIONS and PAGE IDENTIFIERS
 ********************************************** */ 
function highlighted(menu, image) {
  var myString = new String(menu);
  if ((myString.indexOf("menu") == 0 && image == ("nav1_" + nav1)) ||
(myString.indexOf("side") == 0 && image == ("sidenav2_" + nav2))) return
true;
  else return false;
}
function SwapImageOn(menu) {
  active_image = menu;
  var image_name = eval(menu);
  var source_file = "/images/"+image_name+"_on.gif";
  //alert(image_name);
  if (document.layers) {
   document.layers[menu+"div"].document.images[image_name].src =
source_file;
 //alert(document.layers[menu+"div"].document.images[image_name].src);
  }  else {
   document.images[image_name].src = source_file;  
 //alert('source_file');
  }
}
function SwapImageOff(menu) {
  if (menu == null) {
    if (active_image) {
   var image_name = eval(active_image);
   if (! highlighted(active_image, image_name)) {
   var source_file = "/images/"+image_name+".gif";
   if (document.layers)
document.layers[active_image+"div"].document.images[image_name].src =
source_file
     else document.images[image_name].src = source_file;
   active_sub_image = null;
   }
 }
  } else {
    var image_name = eval(menu);
 if (! highlighted(menu, image_name)) {
    var source_file = "/images/"+image_name+".gif";
    document.images[image_name].src = source_file;
 }
  }
}
function TurnSubOn(sectionname) {
  active_sub_div = sectionname;
  if (document.layers) {
    document.layers[sectionname+"subsdiv"].visibility = "visible";
  } else if (document.all) {
    eval(sectionname+"subsdiv").style.visibility = "visible";
  }
} 
function TurnSubOff() {
//turn off the active_sub_div
  if (active_sub_div) {
    if (document.layers) {
   document.layers[active_sub_div+"subsdiv"].visibility = "hidden";
 } else if (document.all) {
      eval(active_sub_div+"subsdiv").style.visibility = "hidden";
 }
    active_sub_div = null;
  }
}
function TurnSideSubOn(sectionname) {
  active_sub_div = sectionname;
  if (document.layers) {
    if (document.layers[perm_side_sub]!=null)
   document.layers[perm_side_sub].visibility = "hidden";
    document.layers[sectionname+"subsdiv"].visibility = "visible";
  } else if (document.all) {
    if (document.all[perm_side_sub] != null) 
   eval(perm_side_sub).style.visibility = "hidden";
    eval(sectionname+"subsdiv").style.visibility = "visible";
  }
} 
function TurnSideSubOff() {
//turn off the active_sub_div
  if (active_sub_div) {
    if (document.layers) {
   document.layers[active_sub_div+"subsdiv"].visibility = "hidden";
   if (document.layers[perm_side_sub]!=null)
     document.layers[perm_side_sub].visibility = "visible";
 } else if (document.all) {
      eval(active_sub_div+"subsdiv").style.visibility = "hidden";
   if (document.all[perm_side_sub] != null) 
     eval(perm_side_sub).style.visibility = "visible";
 }
    active_sub_div = null;
  } else {
    if (document.layers && document.layers[perm_side_sub]!=null)
     document.layers[perm_side_sub].visibility = "visible";
 else if (document.all[perm_side_sub] != null) 
     eval(perm_side_sub).style.visibility = "visible";
  }
}

 

Seems as though the javascript was somehow deleted from the CFHTTP'd file.
Anyone have any ideas.

Any help would be GREATLY appreciated,

Calvin



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to