• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Strange Javascript Error

 
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, all when i run the code given below i get this error.
The callee (server [not server application]) is not available and
disappeared; all connections are invalid. The call did not execute.

<html>
<head>
<script>
function hello()
{
//document.write('<div style="display:hidden;">')
//document.write('<frameset rows="*,*,*">')
//document.write('<frame SRC="framea.html" name="FrameA" noresize>')
document.write('<iframe SRC="c:/b.doc" name="FrameB" noresize>')
document.write('</iframe>')
document.write('<iframe SRC="c:/a.doc" name="FrameG" noresize>')
document.write('</iframe>')
document.write('<iframe SRC="c:/c.doc" name="FrameC" noresize>')
document.write('</iframe>')
document.write('<iframe SRC="c:/d.doc" name="FrameD" noresize>')
document.write('</iframe>')
document.write('<iframe SRC="c:/e.doc" name="FrameE" noresize>')
document.write('</iframe>')
document.write('<iframe SRC="c:/f.doc" name="FrameF" noresize>')
document.write('</iframe>')
//document.write('</div>')
//for (var i=0;i<frames.length;i++)
//{

printotherframe();
//}
}
function printotherframe()
{
//parent.FrameB.focus()
if (confirm("Print Page?")) {
for (var i=0;i<frames.length;i++)
if (window.print)
{
//alert('Print '+frames[i].name);
frames[i].focus();
frames[i].print();


}

}
// printAll()
}
function printotherframe1(i)
{
//parent.FrameB.focus()
if (confirm("Print Page?")) {

if (window.print)
{
alert('Print '+frames[i].name);
frames[i].focus();
frames[i].print();


}

}
//newWind=window.open(); newWind.document.open('c:/a.doc');
//newWind.document.close(); newWind.print();
//newWind.close();
//printAll()
}
function printAll() {
//alert('hello');
history.go(-1)
}
</script>
</head>
<body>
<form name="formA"><input type="button" value="Print the other frame" onKlick="hello()">
</body>
</html>
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are using frames then you can not use head and body tags...
With iframes you do not need a frameset tag...
Also I do not think that iframes act like normal frames in calling them in that manner....I thiik that might be your problem...
If you are going to use the same number of iframes then you could just hardcode things in
document.getElementById("iframe_name").Print();
Eric
[ December 19, 2003: Message edited by: Eric Pascarello ]
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
i executed the file, its working fine.
I didnt get any script error.
Exactly what r u trying to do with this page ?
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For what it's worth, I needed to popup a window, submit a form to my database, create an array from the result and return it to a global variable of the window.opener. As long as the popup window was open the opener window could reference the array. But I needed to close the window because its only reason for being was the trip to the database. Nothing displayed on it. Even tougher -- the variable name needed to be based on input from the user so I couldn't predefine it on the opening window.

As soon as the window was closed I got the same error:

Error: The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call did not execute.

After playing with passing back the array as an array in every way I could think of, I gave up and decided to return a string with the array values delimited. That meant having to parse the string into an array using .split() when the values were needed, but at least the kludge works.

Let use choose our future
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is it a different domain?

Eric
 
reply
    Bookmark Topic Watch Topic
  • New Topic