onSuccess is a callback function.
And where this part of code is perform:
> new Ajax.Request('/updater.php?GetURL=yes',
> {
> method:'get',
> onSuccess: function(transport){
> response = transport.responseText;
> alert(response);
> }
your function ISN'T invoke. It's invoke only when this request is
done.
Therefore response variable is undefined.
1. Give us more knowledge about a context. (When you need GetURL()
function?)
2. If you just want to know current url then you can use
window.location.href
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---