When using transport in prototype like value transport.responseText; Do you need to put the xhttp in front of transport as in normal http requests? Or do you just use it without it, like I have listed in the top line? Please let me know, thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Mike a écrit :> Do you need to put the xhttp in front of transport as in normal http > requests?I fail to see what you mean.> Or do you just use it without it, like I have listed in the top line? > Please let me know, thanks.I believe you should just read the docs on the website, especially the AJAX tutorial [1] and the AJAX API docs [2]. Most of the questions you ask seem to imply you just never tried to build even a simple example... Maybe I''m wrong, but sometimes your questions seem just irrelevant. I certainly don''t mean to offend, I just feel like you''re writhing in a tangle of knots that don''t have to exist at all, and you should just take a long breathe and start a new tryout example from scratch by calmly reading the docs... [1] http://prototypejs.org/learn/introduction-to-ajax [2] http://prototypejs.org/api/ajax Sincerely, -- Christophe Porteneuve a.k.a. TDD "[They] did not know it was impossible, so they did it." --Mark Twain Email: tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I have been reading up on all of this, like I said. I''m just not as good at some of you all are yet. I meant to say, for instance this is how many people use transport in average http requests. xmlHttp.transport.responseText; or Http.transport.responseText; I was just asking if the first part of it was needed with prototype. Or if it only needs to be this. transport.responseText; Also are there any other forums on prototype besides this one? Thanks. On Apr 21, 12:51�am, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> Mike a �crit : > > > Do you need to put the xhttp in front of transport as in normal http > > requests? > > I fail to see what you mean. > > > Or do you just use it without it, like I have listed in the top line? > > Please let me know, thanks. > > I believe you should just read the docs on the website, especially the > AJAX tutorial [1] and the AJAX API docs [2]. �Most of the questions you > ask seem to imply you just never tried to build even a simple example... > > Maybe I''m wrong, but sometimes your questions seem just irrelevant. �I > certainly don''t mean to offend, I just feel like you''re writhing in a > tangle of knots that don''t have to exist at all, and you should just > take a long breathe and start a new tryout example from scratch by > calmly reading the docs... > > [1]http://prototypejs.org/learn/introduction-to-ajax > [2]http://prototypejs.org/api/ajax > > Sincerely, > > -- > Christophe Porteneuve a.k.a. TDD > "[They] did not know it was impossible, so they did it." --Mark Twain > Email: t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hey Mike, Mike a écrit :> xmlHttp.transport.responseText; or Http.transport.responseText; INever saw that, but then, I can''t have eyes everywhere :-)> was just asking if the first part of it was needed with prototype. OrWell, you''re in a callback method that passes transport directly as your argument, so you can just use "myFirstArgName.responseText," as you''ll see on the example codes in the docs.> Also are there any other forums on prototype besides this one?I believe the #prototype IRC channel on irc.freenode.net is fairly active. Aside from that, I don''t know. This GGroup is pretty much authoritative. Don''t be put off by my previous reply though, which was not a rebuke at all. Keep working :-) -- Christophe Porteneuve a.k.a. TDD "[They] did not know it was impossible, so they did it." --Mark Twain Email: tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Appreciated, can''t seem to see a word search in http://www.prototypejs.org/, must not be one? Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Mike a écrit :> Appreciated, can''t seem to see a word search in http://www.prototypejs.org/, > must not be one? Thanks.There is indeed no search feature, but then , GIYF :-) As for the API part, you''ll find multiple alternative formats proposed on the API home page [1], that may better suit your needs and searching requirements. However, these alternatives are offered by third parties, and Prototype Core cannot vouch for their accuracy. [1] http://prototypejs.org/api -- Christophe Porteneuve a.k.a. TDD "[They] did not know it was impossible, so they did it." --Mark Twain Email: tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 fact that I had to google to find out what this meant is, to me, a recursive joke... On Apr 21, 2007, at 7:02 AM, Christophe Porteneuve wrote:> GIYF :-)--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks Christopher, had a question on that code you sent me. When I
hit the submit button it sends me to the action page. Just wondering
why that happens? I know that code isn''t finished yet, I''m
just trying
to understand it so that I can figure out what I need to do next.
Here''s the code again.
<script type="text/javascript"
src="http://www.website.com/prototype/
prototype.js"></script>
<script type="text/javascript">
function bindFormToAJAX() {
Event.observe(''scripty'', ''submit'',
function(e) {
Event.stop(e);
$(''scripty'').request({
onComplete: function(transport) {
$(''script'').value = transport.responseText;
}
});
});
}
</script>
<body>
<form id="scripty" action="test2.php">
<textarea id="script" name="script">aaaa
</textarea><input type="submit" value="Send
it!"/>
</form>
</body>
</html>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
Your DOM element form#scripty doesn''t exist yet when you observe it.
You must do either of the following:
<script type="text/javascript"
src="http://www.website.com/prototype/
prototype.js"></script>
<script type="text/javascript">
function bindFormToAJAX() {
Event.observe(''scripty'', ''submit'',
function(e) {
Event.stop(e);
$(''scripty'').request({
onComplete: function(transport) {
$(''script'').value = transport.responseText;
}
});
});
}
</script>
<body>
<form id="scripty" action="test2.php">
<textarea id="script" name="script">aaaa
</textarea><input type="submit" value="Send
it!"/>
</form>
<script type="text/javascript">
bindFormToAJAX() <----------- HERE!!!!!!!!!!!!!!!!!!!
</script>
</body>
</html>
or:
<script type="text/javascript"
src="http://www.website.com/prototype/
prototype.js"></script>
<script type="text/javascript">
function bindFormToAJAX() {
Event.observe(''scripty'', ''submit'',
function(e) {
Event.stop(e);
$(''scripty'').request({
onComplete: function(transport) {
$(''script'').value = transport.responseText;
}
});
});
}
Event.observe(window, ''load'', bindFormToAJAX); <------
HERE !!!!!!!!!!!!!!!
</script>
<body>
<form id="scripty" action="test2.php">
<textarea id="script" name="script">aaaa
</textarea><input type="submit" value="Send
it!"/>
</form>
</body>
</html>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
OK, I''ll look up how to do a proper load, thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---