File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Strange Javascript Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Strange Javascript Error" Watch "Strange Javascript Error" New topic
Author

Strange Javascript Error

Sahil Sharma
Ranch Hand

Joined: Aug 27, 2003
Posts: 152
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
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

Joined: Oct 19, 2000
Posts: 75
hi
i executed the file, its working fine.
I didnt get any script error.
Exactly what r u trying to do with this page ?


Have a wonderful day and wish u success<p>S Chandra Mohan<br />sc_mohan_us@yahoo.com
G Johnson
Greenhorn

Joined: Dec 21, 2004
Posts: 1
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
is it a different domain?

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Strange Javascript Error
 
Similar Threads
NETSCAPE 6.2 & FRAMES
using frameset
frame function
Adding a div to a frameset
Request parameters are lost in jsp