[Proto-Scripty] window.open on ajax response

2010-07-10 Thread Hari
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;

[Proto-Scripty] Re: window.open on ajax response

2010-07-10 Thread ncubica
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;); }

[Proto-Scripty] Re: referencing div when class event triggered.

2010-07-10 Thread ncubica
I guess you can do something like: funcToCall(event){ var o = Event.element(event); //and that's the object who was been mouseovered X) } Here is a similar question did it time ago in this list best practice...