This week's book giveaway is in the General Computing forum.
We're giving away four copies of Emmy in the Key of Code and have Aimee Lucido on-line!
See this thread for details.
Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

object doesn't support the property or method

Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Posts: 15385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

F is for finger. Can you stick your finger in your nose? Doesn't that feel nice? Now try this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!