Subject: CreatePopup
Posted By: rweide Post Date: 11/18/2004 12:59:06 PM
Hi, all,

I'm using CreatePopup and Show methods to show popup menus, which users can make selection and take them to other pages - this part is successful.

Now, I need to do the same, except when user clicks an item, it will open a document (pdf, doc or xls). I am trying to use something like this:
onClick="window.open('document.pdf','','width=950,height=600')"
. And it is not doing anything, except giving me a script error message, "not implemented'. What did I do wrong? I have no problem opening a document when I don't use the popups.

Thanks.

Reply By: mat41 Reply Date: 11/18/2004 5:28:13 PM
I do not believe you can re-size Acrobat Readers window like a regular pop up window.  You simply need a target="_blank" inside a regular anchr tag:
<a href="path/document.pdf" target="_blank">

Wind is your friend
Matt
Reply By: mat41 Reply Date: 11/18/2004 5:47:26 PM
Correction, yes you can with a .pdf, it will hold the size you give it.  

I had tried this with a word doc before without success.  When word opens it pushes the widow size beyond for example the 500w x 500h I had previously tried.  I just tried it again and experienced the same behaviours.

rweide
I have just reaslized you deleted your second post, all sorted is it?



Wind is your friend
Matt
Reply By: rweide Reply Date: 11/19/2004 8:06:53 AM
I thought it worked, then I realized I used onClick="parent.location.href='file.pdf'" to open this pdf (and spreadsheet) file, that's why I posted and deleted the second post.

Although, I might still with parent.location.href, but I hope to use window.open so that I can have more control, and it still doesn't work on me, how do you do it? Onclick="window.open(.....)"?

And I used the example from Microsoft site about popup object, so I am using <DIV onClick="..."></DIV>, instead of <A>.

Reply By: rweide Reply Date: 11/19/2004 2:36:04 PM
Update: I made it work by using parent.window.open, instead of just window.open. The document needs to be opened on the parent of the popup menu, not on the popup menu as my codes were trying to do.

Thanks for the help.



Go to topic 22163

Return to index page 711
Return to index page 710
Return to index page 709
Return to index page 708
Return to index page 707
Return to index page 706
Return to index page 705
Return to index page 704
Return to index page 703
Return to index page 702