I have 200 lines of an HTML snippet that I plan to convert to
javascript using Prototypes Elements. Instead of doing this by hand,
I figure I could write some code that would take any block of HTML and
convert it to javascript. Then it occurs to me that I couldn't be the
first one to think of
2009/8/18 drewB dbats...@gmail.com:
I have 200 lines of an HTML snippet that I plan to convert to
javascript using Prototypes Elements. Instead of doing this by hand,
I figure I could write some code that would take any block of HTML and
convert it to javascript. Then it occurs to me that
Prototype 2.0 will be separated into 3 modules: lang, dom and ajax.
lang will be usable standalone.
Best,
Tobie
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Prototype script.aculo.us group.
To post to this
I've read the docs, but can't seem to figure out how to POST a form
via AJAX.
I'm sure it is easy (as most prototype.js function calls are) but
how ?
I want the reply to update the div that holds the form (which itself
was downloaded via AJAX).
bill
Hi,
'Tis indeed very easy. Say you have a form wrapped in a div:
div id='formwrapper'form
/form/div
You can post it like so and take the result (which is presumed to be
an HTML snippet in this case) and use that to update the container:
new Ajax.Updater('formwrapper',
On Aug 10, 3:53 pm, molo maurice_lowent...@ssga.com wrote:
Thanks so much T.J., that was the problem. I never would have gotten
that
Incidentally (and not on topic for your question)
td/
is not valid in either HTML or XHTML.
Also, td does not have a 'type' attribute. I believe browsers
Interesting suggestion. Unfortunately, the content is more dynamic
them just text replacements. For example, there is a list of varying
length. Also just using template for 200 lines of text doesn't seem
very tidy to me.
On Aug 18, 3:19 am, Richard Quadling rquadl...@googlemail.com wrote:
On Aug 10, 9:57 am, Sebastien seb.mar...@gmail.com wrote:
Ok, thanks, but how would you implement my code then?
Do I have to overload the whole Sortable.onHover method?
If yes, then every new Sortable created will call the onHover method
isn't it? I would like it to be called only for this
Don't forget the convenience wrapper Form.request, which hijacks the
form's default settings and uses them to construct an Ajax request to
the same endpoint using the same protocol. So that means:
form id=myform action=myform.php method=post
...
/form
script ...
Colin,
Incidentally (and not on topic for your question)
td/
is not valid in either HTML or XHTML.
It's valid XHTML for an empty table cell.
Also, td does not have a 'type' attribute. I believe browsers
generally do let you set an arbitrary attribute (though I haven't
found anything in
Yes, by javascript I mean Prototype API.
A simplified use case is as follows:
A user has selected X pieces of furniture. On a single page, they are
shown a list of the furniture items with specific info about each
piece. For example, name, dimensions, manufacture, list of parts
etc. Much of
On Aug 13, 2:53 pm, Jeztah webmas...@thecarmarketplace.com wrote:
What is the correct Cross browser way to observe a checkbox being
checked or not
I am using
$('hidenonlive').observe('change',function() {
if($('hidenonlive').checked!==true) {
- First case, using a div container (*) : Works as expected on IE8 and
FF but on IE6 you have to click on the actual text to activate InPlace
editing.
(*) I am aware it is bad to put divs in tables, but so far that's the
best working option :o(
What's wrong with putting divs in tables
Spec and reality often differ.
On 8/18/09, ColinFine colin.f...@pace.com wrote:
On Aug 13, 2:53 pm, Jeztah webmas...@thecarmarketplace.com wrote:
What is the correct Cross browser way to observe a checkbox being
checked or not
I am using
$('hidenonlive').observe('change',function()
On Aug 14, 1:32 pm, Floyd Resler adexfl...@gmail.com wrote:
I think you're right on that. I should have expanded my question. If
the object isn't dropped on a Droppable object, how do I get it to go
back to its original position? I tried setting revert to true but the
object always
I can't help with the solution but since you need serverside
processing anyway why not just do it all serverside?
On 8/18/09, drewB dbats...@gmail.com wrote:
Yes, by javascript I mean Prototype API.
A simplified use case is as follows:
A user has selected X pieces of furniture. On a
I noticed in the code for stopObserving that it appears you can get
away with just specifying the element, and then (perhaps) it cancels
all observers for all events for that element. However, the
documentation surprisingly does not mention this ability, but lists
the element, event name, and
On Aug 16, 7:50 am, JoJo tokyot...@gmail.com wrote:
I think I figured it out. The callback must not have parentheses.
FAIL: onUpdate: someFunction();
GOOD: onUpdate: someFunction;
I have no idea why. I am a beginner to JS.
Because onUpdate: someFunction() means Call 'someFunction'
$('foo').stopObserving();
will stop observing all observers on id=foo
$('foo').stopObserving('click');
will stop click observers on id=foo
$('foo').stopObserving('change');
will stop change observers on id=foo
i think you get the idea!
HTH
Alex Mcauley
http://www.thevacancymarket.com
That is an excellent solution!
Thanks!
Floyd
On Aug 18, 2009, at 1:05 PM, ColinFine wrote:
On Aug 14, 1:32 pm, Floyd Resler adexfl...@gmail.com wrote:
I think you're right on that. I should have expanded my question.
If
the object isn't dropped on a Droppable object, how do I get it
Yes! The core devs do need to address whether or not this
Ajax.Request#getStatus() behavior will be fixed.
All non-HTTP requests (namely file:) return a status of 0. A function like
the following needs to be added, probably in Ajax.Request#getStatus()
isHttp: function() {
var pcol =
As I see it the advantages of doing it client-side are:
- The server can handle more users because less work is done there
- Cleaner delineation for presentation layer. If I want to change the
way things look, there are fewer places I need to go.
- Possibly better user experience because there
Hello,
I made an ajax-routine using request and json, which works fine under
all browsers except under IE.
For the sake of illustration I made a simplified version of this. The
link is: http://www.cartesians.com/geefeenster/ajax_test.html
It should show the text: Hello world. The code of the
I am trying to call a JS file using Ajax.Request that will return a
javascript function. This function will be used by code taht will be
injected into a div. Is this possible? It seems like the function is
accessible within the CallBacks of Ajax.Request, but they are not
accessible outside.
Hi , i'm using Ajax.Updater in a nested way.
here is a pseudo-code of my use case
First pass
main_div
a onclick=updateDivWithAjaxUpdater(sub_div)load subdiv/a
sub_div
/subdiv
/main_div
Second pass, sub_div is filled with something like that
a
Hi,
How 'bout a NON-pseudo, standalone example? Because there are a
number of things in that pseudo that could be tripping you up, but I
figure most of them are because it's pseudo...
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available
On
Yep, too many browser differences, use click.
Some browsers fire onchange event as soon as you change the value,
others (IE in fact) only fire the event after the checkbox loses focus.
Good explanation here: http://video.yahoo.com/watch/4943143/13163203 (at
about time -41:46).
regards,
-
An ajax revamp is planned for 2.0.
Best,
Tobie
On Aug 18, 4:55 pm, Ken Snyder kendsny...@gmail.com wrote:
Yes! The core devs do need to address whether or not this
Ajax.Request#getStatus() behavior will be fixed.
All non-HTTP requests (namely file:) return a status of 0. A function like
Hi,
It's documented here[1], which is where you get with the links in the
API TOC. It also appears there's an outdated page here[2] (note the
capitalisation) that does not mention this. Scary. Can't wait until
we ditch this Mephisto stuff for the 1.6.1 generated docs.
[1]
Hi,
They're accessible from anywhere after they're evaluated, but mind how
you declare them, because of a bit of a quirk about how they're
evaluated. There's a badly misplaced note about this in the
documentation, at the bottom of the discussion of Ajax.Updater[1]. It
really should be in the
maybe
http://proto-scripty.wikidot.com/prototype:how-to-load-scripts-dynamically
2009/8/18 Remah donnie.carva...@tfmx.com
I am trying to call a JS file using Ajax.Request that will return a
javascript function. This function will be used by code taht will be
injected into a div. Is this
On Aug 19, 5:30 am, drewB dbats...@gmail.com wrote:
As I see it the advantages of doing it client-side are:
- The server can handle more users because less work is done there
Unlikely. There is very little difference in computation effort
between generating JSON, XML, HTML or delimited text
yay!
On Tue, Aug 18, 2009 at 3:36 PM, Tobie Langel tobie.lan...@gmail.comwrote:
An ajax revamp is planned for 2.0.
Best,
Tobie
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Prototype script.aculo.us
33 matches
Mail list logo