473,287 Members | 1,463 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,287 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 1683
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: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

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.