Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > Adobe Web Programming > Flash (all versions)
| Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Flash (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 3rd, 2005, 01:47 PM
Friend of Wrox
 
Join Date: Jun 2004
Location: Montreal, Quebec, Canada.
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Default getURL with javascript window.open properties

Hello,
Brief, I have af ramed-based page with a flash animation as part of one of those frames content.

When I click on a button in that animation, I want a new "Pop-up-type" of window to open. Everything is working fine eXCEPT that when I close that new window and get back to my frame-baes page, I have nothing in the frame where animation used to be but only have the following wriiten on the bogus page

[object]

Here's the code in the button calling the pop-up:

************************************************** ***********
on (release) {
    stop();

    getURL("javascript:window.open('media/people.html','People','width=800,height=600,direct ories=no,location=no,menubar=no,scrollbars=no,stat us=no,toolbar=no,resizable=yes');");
}


************************************************** ***********
Any help is always appreciated,
Thanks to all,

nancy

 
Old March 15th, 2005, 04:30 PM
Friend of Wrox
 
Join Date: Jun 2004
Location: Montreal, Quebec, Canada.
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Nevermind, it was simply to re-order these in the scene panel,
Please disregard.
Thanks anyway.
 
Old April 14th, 2005, 08:31 AM
Registered User
 
Join Date: Apr 2005
Location: Pretoria, Gauteng, South Africa.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to yvetjie
Default

Hi Nancy,

Hoe did you get it right to get the [object] away on the

on(release){
getURL("javascript:window.open('support.htm','URL' ,'width=600,height=600,directories=no,location=no, menubar=no,scrollbars=no,status=no,toolbar=no,resi zable=no');");}

?

I am getting the same problem.

Yvette
 
Old April 14th, 2005, 08:37 AM
Friend of Wrox
 
Join Date: Jun 2004
Location: Montreal, Quebec, Canada.
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Yvette,
I don't understand your question. Please explain what you would like to do and the problem you're experiencing.
It might not be the same as the problem I was having, so please elaborate.
Thanks,

nancy

 
Old April 14th, 2005, 08:43 AM
Registered User
 
Join Date: Apr 2005
Location: Pretoria, Gauteng, South Africa.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to yvetjie
Default

Here it is - sorry:

When I use the flash button with the javascript pop-up code - the pop up window comes up perfectly but the htm page in the background dissappears and all that is displayed on it is: [object]. Then, when I close the pop-up window I have to press the "back" button to go back to my website.

Thanx, Yvette

 
Old April 15th, 2005, 03:39 AM
Registered User
 
Join Date: Apr 2005
Location: Pretoria, Gauteng, South Africa.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to yvetjie
Default

Hi Nancy,

Are you online? Did you get my message?

Thanx,
Yvette
 
Old April 15th, 2005, 04:41 AM
Registered User
 
Join Date: Apr 2005
Location: Pretoria, Gauteng, South Africa.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to yvetjie
Default

Fixed the probem - never mind.

Thanx anyway
Yvette

 
Old April 15th, 2005, 09:09 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Oklahoma City, Oklahoma, USA.
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
Default

How did you fix it? I have been having the same problem. Mine works on Apple side but leaves the [object] on the PC side.

Here is my code:
<A HREF="javascript:window.open('preview_images.asp', 'Portfolio','width=520,height=400,resizable=yes,sc rollbars=yes,status=no,screenx=100,screeny=20'); return false">Open Link</A>

Peace
Mike
http://www.eclecticpixel.com
http://www.homegrownmusicjam.com
 
Old April 15th, 2005, 09:26 AM
Friend of Wrox
 
Join Date: Jun 2004
Location: Montreal, Quebec, Canada.
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello, while it has been awhile I have been back into that file, I did notice one difference between the code listed above and mine:

on (release) {
    stop();

I have "stop()" before calling the Pop-up.
I hope this helps,
nancy

 
Old June 4th, 2005, 07:52 AM
Registered User
 
Join Date: Jun 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to vladko
Default

The reason [object] appears is that the window.open function return a result to the browser. You do not want that in this case - you just want the javascript to run and open a new window. So, you must specify that the function should be void (i.e. does not return a result):

getURL("javascript:void window.open('mywindow.html')");

And voilla!

Vla




Similar Threads
Thread Thread Starter Forum Replies Last Post
New window not being open by javascript akhilesh_g Classic ASP Professional 1 September 14th, 2007 04:13 AM
JavaScript : window.open -> Popup Blocker Issue AbrarNazeer Pro JSP 0 September 2nd, 2006 05:49 AM
javascript: window.open & document.documentElement rockon Javascript 2 February 3rd, 2005 04:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.