Hi
Thanks for all your explanations.. But still didn't solve my issue...
Since the <a> tag is in the flash object I can't use the onClick
event... It doesn't work even on Chrome...
I tried javascript: return someFunction(); and got always the same
problem... Works great on Chrome but IE and FF does nothing...
So with javascript: someFunction(); return false;
I've even checked the z-index of the modalbox layer to see if it was
popping under the flash object but it is set to 99999 or something...
so I don't think it's the problem...
There is a way to get this work on IE and FF? Can I provide a link to
this site so you can see what's happening?
On 29 Mar, 21:47, Justinas Urbanavicius <
justin...@gmail.com> wrote:
> Hi,
>
> the return false is there for a reason, to prevent the default anchor click
> action. When you click on a link, browser executes onclick event javascript
> and navigates to the href tag URL. If you return false in the onclick event
> you force be browser to stop the navigation and just run the javascript
> code.
>
> Your implementation of modalbox differs from the examples in the modalbox
> site. although javascriipt:somefunction() might work, browsers don't like
> that very much in their href tag. and on the other hand you have to return
> false to the browser so it wouldn't try to open the
> javascript:somefunction() as an URL like you noticed in FireFox and IE.
> The problem is you need to return the result of the somefunction() to the
> browser ergo
> javascript:return somefunction(); or javascript:somefunction(); return
> false;
>
> Frankly i would advise you to use onclick tag, or even better unobtrusive event
> binding <
http://www.prototypejs.org/api/event/observe> that prototype
> library provides.
> example:
> <a id="myModalboxLink" href="javascript:someFunction();">Click here</a>
>
> $('myModalboxLink').observe('click', someFunction);
>
> And take a look closer to what parameters you provide to Modalbox:
> {title: *this*.title, width:900, height: 800}
> you should notice *this* object. because you call Modalbox in a function and
> not on the html element *this *in this scope is the function, and so it does
> not have the title property, so you should see modalbox open with no title.
>
> if you call modalbox as in examples in the element onclick tag *this* is the