Hey all,
I''m just checking my understanding. Would someone be so kind as to
comment on the following?
Event.observe(''this_link'', ''click'',
function() {
AJAX.Updater(''that_div'', ''my.php'', {
evalscripts: true}) });
<div that_div>
</div>
///////
my.php
echo("<script>alert(''Loaded'')");
There''s a lot more to all of it than that, but this is where
I''m
hitting problems and I have no idea why. this is my first time using
evalscripts and I''m a fairly novice prototyper (though an experienced
coder)
the eventual javascript will actually call Event.Observe again and
$F().present to validate form elements to submit data to a php file
that will insert an element into a database.
currently it''s not working for even the alert function.
Any help would be appreciated.
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
Event.observe(''this_link'', ''click'',
function() { AJAX.Updater(''that_div'',
''my.php'', { evalScripts: true}) });
evalScripts with a uppercase S
-----Message d''origine-----
De : rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
[mailto:rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] De la part
de The-PISW
Envoyé : vendredi 12 octobre 2007 06:45
À : Ruby on Rails: Spinoffs
Objet : [Rails-spinoffs] Evalscripts
Hey all,
I''m just checking my understanding. Would someone be so kind as to
comment
on the following?
Event.observe(''this_link'', ''click'',
function() { AJAX.Updater(''that_div'',
''my.php'', { evalscripts: true}) });
<div that_div>
</div>
///////
my.php
echo("<script>alert(''Loaded'')");
There''s a lot more to all of it than that, but this is where
I''m hitting
problems and I have no idea why. this is my first time using evalscripts
and I''m a fairly novice prototyper (though an experienced
coder)
the eventual javascript will actually call Event.Observe again and
$F().present to validate form elements to submit data to a php file that
will insert an element into a database.
currently it''s not working for even the alert function.
Any help would be appreciated.
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
Make sure you test it with IE too - IE doesn''t seem to happy about the evalScripts or AJAXing files with JS in general. What works perfectly fine in FF doesn''t work here... Or maybe I''m just doing something wrong... =) On Oct 12, 9:27 am, "Gilles Albusac" <gilles.albu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Event.observe(''this_link'', ''click'', function() { AJAX.Updater(''that_div'', > ''my.php'', { evalScripts: true}) }); > > evalScripts with a uppercase S > > -----Message d''origine----- > De : rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [mailto:rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] De la part de The-PISW > Envoyé : vendredi 12 octobre 2007 06:45 > À : Ruby on Rails: Spinoffs > Objet : [Rails-spinoffs] Evalscripts > > Hey all, > I''m just checking my understanding. Would someone be so kind as to comment > on the following? > > Event.observe(''this_link'', ''click'', function() { AJAX.Updater(''that_div'', > ''my.php'', { evalscripts: true}) }); > > <div that_div> > </div> > > /////// > my.php > > echo("<script>alert(''Loaded'')"); > > There''s a lot more to all of it than that, but this is where I''m hitting > problems and I have no idea why. this is my first time using evalscripts > and I''m a fairly novice prototyper (though an experienced > coder) > > the eventual javascript will actually call Event.Observe again and > $F().present to validate form elements to submit data to a php file that > will insert an element into a database. > > currently it''s not working for even the alert function. > > Any help would be appreciated.--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Mickster wrote:> Or maybe I''m just doing something wrong... =)Probably... As far as I know, there aren''t any documented cross- browser issues. Please make sure to file a bug report if you''ve bumped into something strange. Thanks! Tobie --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
The-PISW schrieb:> <div that_div> > </div>Should be <div id="that_div"></div>> echo("<script>alert(''Loaded'')");Closing script-tag is missing, not sure if prototype will identify this as a valid script. Frank -- "Laut einer Studie der deutschen Ärztevereinigung sterben immer mehr Rentner vor dem Computer. Sie drücken versehentlich die Tastenkombination Alt+Entfernen." http://www.landseer-stuttgart.de http://www.pn-cms.de --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Ah, that explains it then. I''m still getting used to the fact that Javascript is case sensitive. Thank you. On Oct 12, 3:27 am, "Gilles Albusac" <gilles.albu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Event.observe(''this_link'', ''click'', function() { AJAX.Updater(''that_div'', > ''my.php'', { evalScripts: true}) }); > > evalScripts with a uppercase S > > -----Message d''origine----- > De : rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [mailto:rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] De la part de The-PISW > Envoyé : vendredi 12 octobre 2007 06:45 > À : Ruby on Rails: Spinoffs > Objet : [Rails-spinoffs] Evalscripts > > Hey all, > I''m just checking my understanding. Would someone be so kind as to comment > on the following? > > Event.observe(''this_link'', ''click'', function() { AJAX.Updater(''that_div'', > ''my.php'', { evalscripts: true}) }); > > <div that_div> > </div> > > /////// > my.php > > echo("<script>alert(''Loaded'')"); > > There''s a lot more to all of it than that, but this is where I''m hitting > problems and I have no idea why. this is my first time using evalscripts > and I''m a fairly novice prototyper (though an experienced > coder) > > the eventual javascript will actually call Event.Observe again and > $F().present to validate form elements to submit data to a php file that > will insert an element into a database. > > currently it''s not working for even the alert function. > > Any help would be appreciated.--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---