File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes object doesn't support the property or method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "object doesn Watch "object doesn New topic

object doesn't support the property or method

deva siva
Ranch Hand

Joined: Apr 29, 2005
Posts: 37
i have a main window, when i click popups on this window its opens a new window(it is a modalDialog window).on this there is one more link named export, when we click that export button that, the content of the popup window will be downloaded in pdf format. it is working fine, now my question is.when we click export its ask dilog window like open/save/cancel. when we click open buton that document will be opend successfuly in pdf format. NOw when we click save button the document was saved successfully in given path but back end its gives a Internet explorer script error like "object doesn't support the property or method"

here when we click export button its call saveas.jsp file thru java script function like

function export
s=window.showModalDialog(saveas.jsp, "export", 'set the requird properties here');
if (s)

the saveas.jsp file contains options like in which format document download like 1. pdf 2. excel the user select choose the one option and click ok button its calls download.jsp file

the saveas.jsp file contain these below function.
function down
var downLoadURL="<%=request.getContextPath()%>"+"/Download.jsp";
var pdf=downLoadURL+"?reportName="+temp_baag+"&format="+doption;
here when we are using window.returnValue = pdf, then the following location is going back to calling window.
from that window to iam using documet.location.replace(pdf);

suppose iam using document.location.replace(PDF) is using at the place of window.returnValue=pdf, then iam not getting that object doesn't support error but when we use document.location.replace(pdf) its opens in new browser window, but our client not needed to open extra window.
so can u help me there is any solution to download documet with out opend new window or how to solve the above error.

so help me ass soon as possible.

Thanking for Advance.
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
You can not create a modal object and try to replace the current window's location with it.

Why don't you just do:


That will open up the pdf for them to view/print and it will not open up a new window. They can use their back button to get back to the page they were on.

I would reccomend not using a modal window for a pop up to view a document. You probably should just use a trad. pop up window.

deva siva
Ranch Hand

Joined: Apr 29, 2005
Posts: 37
hi Eric,

iam using document.location.href = "myjsp" page, but still its opened in new window, and also get same error.(object doesnot support).

so can u pls give me suggestion.

I agree. Here's the link:
subject: object doesn't support the property or method
It's not a secret anymore!