Is it possible to observe when the content of a DIV is changed?
So for example, I update the innerHTML (ajax perhaps?) and some JS
class is listening when the content is changed.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goog
Anyone? Any thoughts at all?
On Apr 21, 3:40 pm, Ram wrote:
> Hi all,
>
> I have an RoR app in which Im using Effect.toggle('id', 'slide') to
> show and hide a div.
>
> However, the actual effect of sliding does not show (neither do
> 'blind' or 'appear'). Instead, there is a delay (of approxima
I remember that this is was similar topic
http://groups.google.com/group/prototype-core/browse_thread/thread/8c985657990e504a/c8c8b02653941fbd?hl=en&lnk=gst&q=namespace#c8c8b02653941fbd
p.s. newer version of my proposal
https://gist.github.com/77662/e707772846311f9578328b8e929aea2fa52e3cc3
--~--
are you spawing of other javascript functions at the same time
2009/4/22 Ram
>
> Anyone? Any thoughts at all?
>
> On Apr 21, 3:40 pm, Ram wrote:
> > Hi all,
> >
> > I have an RoR app in which Im using Effect.toggle('id', 'slide') to
> > show and hide a div.
> >
> > However, the actual effect of
spawning off other JS functions?
nope..
I read about how effects queue up and so i need to actually do
new Effect.toggle('comms', 'slide');
instead of just
Effect.toggle('comms', 'slide'); (which was what i was doing before)
But that makes no difference.
It cant be a browser issue because the dem
Hi there, I'm Nahuel from Argentina, and I'm new in this group.
I have a question about Ajax.PeriodicalUpdater:
If you use PeriodicalUpdater to return data to fill a component, such
as a DIV, and that div is then deleted or changed, the
PeriodicalUpdater continues to run, How can I solve this? I
Hi,
Lately I've run into the challenge to load JSON data through an AJAX
interface and then convert it to HTML. I've been trying to come up
with several approaches to do this, ranging from using the Template
object from Prototype.js to creating HTML elements through Javascript
or adding the HTML
That sound good, could you provide me an example?
2009/4/22 Yozefff
>
> Is it possible to observe when the content of a DIV is changed?
>
> So for example, I update the innerHTML (ajax perhaps?) and some JS
> class is listening when the content is changed.
> >
>
--
Saludos
NB.
MSN: nbul...@gm
Let me to be clear with the issue, my code looks in that way:
*When the select change the DIV container is reload.*
The page load here has the PeriodicalUpdater
*The code load here works fine, and stop when some part of the code in the
success function is triggered, the issue is presented if
Hi,
PeriodicalUpdater has a stop method.[1] So keep a reference to it,
and then call its stop method when you delete the div being updated.
(Changing the div isn't a problem, provided it still exists.)
[1] http://www.prototypejs.org/api/ajax/periodicalUpdater
HTH,
--
T.J. Crowder
tj / crowder
most likely it's related to the content of what you are trying to
apply the effect on.
I tried your example, works fine on FF & IE6.
Can you provide more info related to css you apply to div#comms
cheers
--
mona
mreml...@optaros.com
On Wed, Apr 22, 2009 at 2:24 PM, Ram wrote:
>
> spawning off
I once used EJS (embedded javascript)
http://embeddedjs.com/
good performace and a very low learning curve.
I am too interested to know any feedback about this library
cheers
--
mona
mreml...@optaros.com
On Wed, Apr 22, 2009 at 9:28 AM, Ron Derksen wrote:
>
> Hi,
>
> Lately I've run into the c
I have been using YUI (Yahoo User Interface Library) to display JSON data
(after doing whatever transformations I need to do, using Javascript code)
So I avoided HTML altogether.
On Wed, Apr 22, 2009 at 3:28 AM, Ron Derksen wrote:
>
> Hi,
>
> Lately I've run into the challenge to load JSON data
hey Mona,
i tried removing the css on the div but the effect still did not work.
Here's all the code im using for this..
posts/show.html.erb
...
<%= render :partial => "comments" %>
...
comms div/comments partial
<% @comments.each
ok I was able to replicate your bug when I added this rule
div#comms>div {float:left;}
so the thing is that you are trying to hide a div that has all its
contents floating, so theoratically, this div has no actual height.
to fix this, you need to apply the known clearfix hack.
add the following
Can you try removing this --> style="display:none"
and setting it in Javascript like so: $("comments-section").hide() [to hide
it] and $("comments-section").show() [to show it]??
On Wed, Apr 22, 2009 at 10:12 AM, Ram wrote:
>
> hey Mona,
>
> i tried removing the css on the div but the effect sti
You can also set overflow:auto to the same effect, and you don't have
to hide it from other browsers, either.
Walter
On Apr 22, 2009, at 10:17 AM, Mona Remlawi wrote:
> .clearfix {zoom: 1; /* triggers hasLayout */ }
--~--~-~--~~~---~--~~
You received this
$("your element id").observe("DOMCharacterDataChanged",function(evt){
//your code here
});
Try above
Check the Event.Observe documentation on prototype api documentation
website.
This website gives you a link to DOM 2 Events list. Check the Mutation
Events section.
On Wed, Apr 22, 2009 at 7:0
Anath's idea would be ideal but I am not sure how supported that event
actually is.
Alternatively, it'd be a bit more work but still would satisfy your
event requisite of just firing off you own event when you update.
var oldHTML = ele.innerHTML;
ele.update(text);
ele.fire("x:update", { oldHTM
2009/4/22 Ron Derksen :
>
> Hi,
>
> Lately I've run into the challenge to load JSON data through an AJAX
> interface and then convert it to HTML. I've been trying to come up
> with several approaches to do this, ranging from using the Template
> object from Prototype.js to creating HTML elements t
Hey Mona,
Im afraid that dint work.
.clearfix {zoom: 1; /* triggers hasLayout */ }
Im testing it out in FF and Safari. But i put in the above code in my
layout file's section anyway. Dint work. Removed it, dint work.
Could you tell me where I can read this up? Maybe ill be able to
figure
Windows IE doesn't properly set floated elements to occupy design
space unless you set a value for the height or width, or you use one
of several different hacks to get it to trigger its internal property
"hasLayout".
.clearfix {
overflow: auto;
}
or
Either one of these will wor
On Apr 22, 5:49 pm, Richard Quadling wrote:
> You do have the option of creating the HTML fragment on the server and
> simple passing the completed code to the client.
Indeed, and if you use a template engine like Smarty, you can use the
retrieve compiled HTML snippets using its fetch() method:
I wrote an IE specific "In Place Editor" back in 2003. Now I need it
to be cross browser. I decided to turn to script.aculo.us; having
been happy with its easy "new Effect.foo" goodies.
Although the main script.aculo.us InPlaceEditor usage seems to be to
update the server when the user clicks "
On Apr 22, 9:02 pm, Yozefff wrote:
> Is it possible to observe when the content of a DIV is changed?
The W3C DOM 2 Events specification has an Interface MutationEvent for
that purpose (and others). Support may vary across browsers:
http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-Mu
Hi,
Thanks for your reply! Yes, i have ensured that the response on the
server side is correct, its just that its not sending the response in
the response object. Can you tell me how i can make new Ajax objects
for each new Ajax call? because this code :- new Ajax.Request(), makes
only a new aj
Hi Walter,
Thanks for pointing me to the right resources. Im reading up on it
here http://www.communitymx.com/content/article.cfm?page=2&cid=c37E0.
It still doesnt fix my problem though. I tried overflow:auto instead
of zoom:1 and the only difference was the I got a vertical scroll bar
inside th
hey Ram, you mentioned that you are testing on Safari and FF.
so you need to include this rule
.clearfix:after
{content:".";display:block;height:0;clear:both;visibility:hidden;}
in your style block.
.clearfix {overflow:auto}
is required for IE support.
http://www.google.com/search?q=clearing+flo
28 matches
Mail list logo