I know that in IE you can do this but its very picky and if you do it
the wrong way it either gives you a blank page or an error. I know for
a fact that I have something like the following code working in IE 5
and above:
<a href="javascript:parent.doSomething('5273')";>
The only real difference between mine and yours is that you have more
than one statement inside the javascript: part. I would recommend
trying to do the same thing except put the return statement inside your
function instead of inline in the javascript: command.
ie try it without the "return
> document.MM_returnValue" inside your <a > tag.
Oh and looking at it again I know that having " " and ' ' begins to
cause problems in this particular href=javascript notation. I have had
many problems with it in the past. If the above doesnt work I would
recommend remove the escape characters \' as these may be confusing
it. If you can , handle the escape character inside the actual
function.
the simpler that href=javascript command is , the easier it will be
for you to debug, of this im sure. Try to do as much as you can inside
the function.
> I've searched the web as well as I can for a solution to this problem
> but have found nothing and just don't know enough about JavaScript to
[quoted text clipped - 39 lines]
> Thanks!
> - whit
whitgurley@gmail.com - 27 Dec 2006 18:56 GMT
Thanks a lot for the reply, dalouis. I've done a little tinkering and
am still not have having any real luck. My revised setup is this:
<script type="text/JavaScript">
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2)
eval(args[i]+".location='"+args[i+1]+"'");
return true
}
//-->
</script>
<a
href="javascript:MM_goToURL('parent.frames[\'movieA\']','color2.html')">TEST2</a>
This setup is still working fine in Safari (I had my browser details
wrong in the original message), but in Firefox it's causing the link to
bounce me to a page that just says "false" (you probably could have
told me that by looking at the function). I tried removing the escapes
outright, which broke the setup completely, but I re-read the reply and
realized you meant for me to move them up to the function. Problem is,
I don't have any idea where or how to do that. Any more tips?
> I know that in IE you can do this but its very picky and if you do it
> the wrong way it either gives you a blank page or an error. I know for
[quoted text clipped - 65 lines]
> > Thanks!
> > - whit
Doesn't look like "bumping" works in newsgroups like this, but I'll try
it anyway. Anybody out there who can shed some light on this issue?
VK - 30 Dec 2006 22:01 GMT
> Doesn't look like "bumping" works in newsgroups like this, but I'll try
> it anyway. Anybody out there who can shed some light on this issue?
You cannot do it on modern browsers with the default Flash player
installation.
javascript:void(codeToExecute) pseudo-protocol trick was good for a
long time but now it's blocked as well.
On IE 6,7 it's simply ignored, on Firefox you'll see a security warning
dialog. It is because the modern Flash player is a sophisticated
programming environment by its own with security policies differing
sometimes from the policies of the browser it is run on (XMLHttpRequest
cross-domain communication is the first comming into my mind).
Respectively it may have his very own security exploits which browser
producers do not want to be held responsible for.
This way either abandon Flash whatsoever or make the entire interface
as one big Flash movie.
whitgurley@gmail.com - 30 Dec 2006 22:37 GMT
Crap. That screws up my plan. I really don't want to enclose the entire
thing in a Flash movie. No wonder the existing setup wasn't working in
any browser that I was testing it in. Still, how is that different from
issuing JS pop-up window commands? The pop-up contact form at this site
still works:
http://www.morris-day.com/home.html (click "Contact Us" then the
"Contact Form" link)
I can make my plan work with actual pop-up windows, I'd just prefer to
use DIVs. At any rate, thanks for the reply, VK.
> You cannot do it on modern browsers with the default Flash player
> installation.
[quoted text clipped - 11 lines]
> This way either abandon Flash whatsoever or make the entire interface
> as one big Flash movie.
VK - 30 Dec 2006 23:00 GMT
>. Still, how is that different from
> issuing JS pop-up window commands? The pop-up contact form at this site
> still works:
> http://www.morris-day.com/home.html (click "Contact Us" then the
> "Contact Form" link)
Difficult to say - as I said Flash ActionScript may have its own
vulnerabilities and respectively its own bug exploits. From the other
side I see address bar flashing for a sec in the new window but
disappearing after. So maybe they simply do getURL(formPage) with
_target blank - so no javascript usage from movie, pure HTML mechanics,
and the script on formPage does the rest.
I don't want to decompile someone's movie without permission, so I
cannot tell for sure.
See also
<http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_man
ager.html#117164>
whitgurley@gmail.com - 30 Dec 2006 23:14 GMT
I should have specified that I created it - years ago, so I didn't
remember what the setup was - and also didn't realize I had the source
file handy. It looks like you're half right:
on (release) {
getURL("javascript:openNewWindow('contact.html','contact','height=700,width=800,toolbar,scrollbars,resizable,left=20,top=20')");
}
All the parameters seem to be contained in the one "URL," so I guess
this is allowed because it's not calling a function elsewhere on the
page?
> Difficult to say - as I said Flash ActionScript may have its own
> vulnerabilities and respectively its own bug exploits. From the other
[quoted text clipped - 8 lines]
> See also
> <http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_man
ager.html#117164>
VK - 30 Dec 2006 23:32 GMT
> I should have specified that I created it - years ago, so I didn't
> remember what the setup was - and also didn't realize I had the source
[quoted text clipped - 6 lines]
> this is allowed because it's not calling a function elsewhere on the
> page?
That is a fancy matter. On my Firefox 1.5 / Flash 9.0 plugin for your
side I'm indeed getting popup window. At the same time even for a
_local_ page having openNewWindow function called from flash by
getURL("javascript:openNewWindow()") I'm getting security alert.
I'm admittedly not a profound specialist of Flash <> JavaScript
bridging, maybe it's time for a more specific group like
<macromedia.flash.actionscript>. Some answer can be also hidden at
<http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_man
ager04a.html#119065>
If you come up with an explanation, it would be hice to have it posted
here.
whitgurley@gmail.com - 30 Dec 2006 23:50 GMT
I'll open up a conversation on that group and let you know if the
question gets answered. Thanks for your feedback, VK.
> > I should have specified that I created it - years ago, so I didn't
> > remember what the setup was - and also didn't realize I had the source
[quoted text clipped - 6 lines]
> > this is allowed because it's not calling a function elsewhere on the
> > page?