473,395 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Javascript and flash problem - please help!

Here is the script I have in my page :

<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "',
'toolbar=0,scrollbars=0,location=0,statusbar=0,men ubar=0,resizable=0,width=194,height=146,left
= 440,top = 288');");
}

// End -->
</script>

It opens a new window when the user clicks on a certain link.

Well, somewhere else in the page, I embeded a flash media object and
found out now that everytime the page opens, the pop up window opens
too which is NOT what I want. I want the Popup window to only open
when the user clicks on a text link (which it did work perfectly until
I put in the flash object).

So why is the flash object calling the popup window instead of just
playing like it is supposed to?

Mar 27 '06 #1
3 1689
jo************@yahoo.com said the following on 3/26/2006 9:38 PM:
Here is the script I have in my page :

<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "',
<URL: http://jibbering.com/faq/#FAQ4_40 >
'toolbar=0,scrollbars=0,location=0,statusbar=0,men ubar=0,resizable=0,width=194,height=146,left
= 440,top = 288');");
}

// End -->
</script>
<script type="text/javascript">
function myPopupFunction(URL){
day = new Date();
id = day.getTime();
windowRef = "page" + id;
windowRef=window.open(URL,id,toolbar=0,scrollbars= 0,location=0,statusbar=0,menubar=0,resizable=0,wid th=194,height=146,left=440,top=288);
}
</script>
It opens a new window when the user clicks on a certain link.
It had some problems with it though. The eval was not needed and the
feature list can not have spaces in it. It is a comma delimited list.
Well, somewhere else in the page, I embeded a flash media object and
found out now that everytime the page opens, the pop up window opens
too which is NOT what I want. I want the Popup window to only open
when the user clicks on a text link (which it did work perfectly until
I put in the flash object).
So why is the flash object calling the popup window instead of just
playing like it is supposed to?


Sounds like your flash object may have a call in it somewhere that calls
a popUp function. Try changing the name of your function and see what
happens.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Mar 27 '06 #2
Ok, I replace that old code with the new code and it still gives me the
problem of popping up because of the flash link. Sorry, here is the
code.

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
width="246" height="172">
<param name=movie
value="flash/knucklehead.swf">
<param name=quality value=high>
<embed src="flash/knucklehead.swf"
quality=high
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"
type="application/x-shockwave-flash" width="246" height="172">
</embed>
</object>
Lee wrote:
jo************@yahoo.com said:

Here is the script I have in my page :

<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "',
'toolbar=0,scrollbars=0,location=0,statusbar=0,me nubar=0,resizable=0,width=194,height=146,left
= 440,top = 288');");
}

// End -->
</script>

Replace that nonsense with:

function popUp(URL) {
window.open(URL,
"w"+(new Date()).getTime(),
"width=194,height=146,top=440,top=288");
}
</script>
It opens a new window when the user clicks on a certain link.

Well, somewhere else in the page, I embeded a flash media object and
found out now that everytime the page opens, the pop up window opens
too which is NOT what I want.


My guess is that you did something wrong when you embedded the object,
but you haven't shown us that code, so it's just a guess.
--


Mar 27 '06 #3
Ok, here is my newest version of the script :

function jumpUp(URL) {
window.open(URL,
"w"+(new Date()).getTime(),
"width=194,height=146,top=440,top=288");
}

</script>

And here is the Call to for the Popup window :

<a href="javascript: jumpUp('webmovies/reverse_flash.swf')">preview</a>
Works in Firefox, but I get an error in IE 6.0
Here is the Flash :
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
width="246" height="172">
<param name="movie"
value="flash/knucklehead.swf">
<param name="quality"
value="high"><param name="LOOP" value="false">
<embed src="flash/knucklehead.swf"
width="246" height="172" loop="false" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash"></embed></object>

Any help is appreciated.

Mar 27 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: kevin | last post by:
meta refresh tag is failing , it is supposed to go to the entry1.htm site which is the flash swf file but it doesn't check code please http://members.optusnet.com.au/~kevindauth/ thanks...
0
by: Matt | last post by:
Hello, I am attempting to get a software prototype UI/demo built in Flash to talk with existing C++ (so I can exchange data and commands between the application-software already developed in the...
1
by: bin_P19 P | last post by:
the code i have got is as follows and now im stuck <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Shopping...
4
by: kidalex | last post by:
I'm a programmer but I have never programmed in Action Script or very advanced JavaScript. So, please be gentle :-) I'm looking to develop a simple ( or is it? ) system with 2 parts to it: ...
2
by: Anees | last post by:
Hi, i need to invoke a javascript function while clicking a button that is in a flash movie. i hav used geturl() to redirect the page to some other page. but is it possible to call a javascript...
1
by: critchey1 | last post by:
Hey everyone, i've been playing around with trying to get some scripts to work with detecting whether flash player is installed on your computer or not. I found a flash detection kit on the adobe...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.