Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Strange Javascript Error

 
Sahil Sharma
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • 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>
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • 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 ]
 
S Chandra Mohan
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • 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 ?
 
G Johnson
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is it a different domain?

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic