But even this doesn't help since function call happens by a call back
and not user action. So the browser popup blocker click in.
One way i could think is make the Ajax call synchronous. But I think
its not a great idea to make the Ajax call synchronous...

Regards,
Hari

On Jul 11, 7:29 am, ncubica <[email protected]> wrote:
> I guess one easy option is to call a outside function like
>
>        new Ajax.Request('someURL', {
>           onSuccess: function(response) {
>             var success = response.responseText;
>             success == "true" ? openPopup("http://google.com";) :
> openPopup("http://yahoo.com";);
>           }
>         });
>
> function openPopup(site){
>     window.open(site);
>
> }
>
> mmm but what I don't know is if the browser is going to keep blocking
> the new window... the only difference with this is the scope.
>
> but that should be work...
> Nahum
>
> On Jul 10, 7:49 am, Hari <[email protected]> wrote:
>
>
>
> > Hi,
>
> > I have hyperlink. When a user clicks on it, i would make a ajax call
> > to get the location where a new browser window should be opened.
>
> > for example:
> >        new Ajax.Request('someURL', {
> >           onSuccess: function(response) {
> >             var success = response.responseText;
> >             success == "true" ? window.open("http://google.com";) :
> > window.open("http://yahoo.com";);
> >           }
> >         });
>
> > But problem is the window.open is called as part of onSuccess
> > callback. So the browser popup blocker blocks the call.
>
> > How can I get around this problem and want the popup to open.
>
> > Thanks,
> > Hari

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to