[Proto-Scripty] Observe div content change?

2009-04-22 Thread 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. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[Proto-Scripty] Re: the effect in Effect.toggle does not work

2009-04-22 Thread Ram
Anyone? Any thoughts at all? On Apr 21, 3:40 pm, Ram yourstruly.vi...@gmail.com 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

[Proto-Scripty] Re: Namespace Function

2009-04-22 Thread Radoslav Stankov
I remember that this is was similar topic http://groups.google.com/group/prototype-core/browse_thread/thread/8c985657990e504a/c8c8b02653941fbd?hl=enlnk=gstq=namespace#c8c8b02653941fbd p.s. newer version of my proposal https://gist.github.com/77662/e707772846311f9578328b8e929aea2fa52e3cc3

[Proto-Scripty] Re: the effect in Effect.toggle does not work

2009-04-22 Thread Brendan O Connor
are you spawing of other javascript functions at the same time 2009/4/22 Ram yourstruly.vi...@gmail.com Anyone? Any thoughts at all? On Apr 21, 3:40 pm, Ram yourstruly.vi...@gmail.com wrote: Hi all, I have an RoR app in which Im using Effect.toggle('id', 'slide') to show and hide a

[Proto-Scripty] Re: the effect in Effect.toggle does not work

2009-04-22 Thread Ram
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

[Proto-Scripty] Prototype: Ajax.PeriodicalUpdater keeps running after container is removed or changed

2009-04-22 Thread NonoX
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?

[Proto-Scripty] templating best practices

2009-04-22 Thread 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 through Javascript or adding the HTML

[Proto-Scripty] Re: Observe div content change?

2009-04-22 Thread Nahuel Bulian
That sound good, could you provide me an example? 2009/4/22 Yozefff yoze...@gmail.com 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:

[Proto-Scripty] Re: Observe div content change?

2009-04-22 Thread Nahuel Bulian
Let me to be clear with the issue, my code looks in that way: div id='dropdown' select name=categoryoption/option/select /div *When the select change the DIV container is reload.* div id='container' The page load here has the PeriodicalUpdater /div *The code load here works fine, and stop when

[Proto-Scripty] Re: Prototype: Ajax.PeriodicalUpdater keeps running after container is removed or changed

2009-04-22 Thread T.J. Crowder
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

[Proto-Scripty] Re: the effect in Effect.toggle does not work

2009-04-22 Thread Mona Remlawi
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

[Proto-Scripty] Re: templating best practices

2009-04-22 Thread Ananth Raghuraman
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 cheval...@gmail.com wrote: Hi, Lately I've run into the challenge

[Proto-Scripty] Re: the effect in Effect.toggle does not work

2009-04-22 Thread Ram
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 ... div class=gform %= render :partial = comments % /div ... comms div/comments partial div class=form style=display:none id=comments-section

[Proto-Scripty] Re: the effect in Effect.toggle does not work

2009-04-22 Thread Mona Remlawi
ok I was able to replicate your bug when I added this rule div#commsdiv {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

[Proto-Scripty] Re: the effect in Effect.toggle does not work

2009-04-22 Thread Ananth Raghuraman
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 yourstruly.vi...@gmail.com wrote: hey Mona, i tried removing the css on the div

[Proto-Scripty] Re: the effect in Effect.toggle does not work

2009-04-22 Thread Walter Lee Davis
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

[Proto-Scripty] Re: Observe div content change?

2009-04-22 Thread Ananth Raghuraman
$(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:02

[Proto-Scripty] Re: Observe div content change?

2009-04-22 Thread Matt Foster
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, { oldHTML

[Proto-Scripty] Re: templating best practices

2009-04-22 Thread Richard Quadling
2009/4/22 Ron Derksen cheval...@gmail.com: 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

[Proto-Scripty] Re: the effect in Effect.toggle does not work

2009-04-22 Thread Ram
Hey Mona, Im afraid that dint work. style type=text/css .clearfix {zoom: 1; /* triggers hasLayout */ } /style Im testing it out in FF and Safari. But i put in the above code in my layout file's head section anyway. Dint work. Removed it, dint work. Could you tell me where I can read this

[Proto-Scripty] Re: the effect in Effect.toggle does not work

2009-04-22 Thread Walter Lee Davis
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 !--[if IE] style type=text/css

[Proto-Scripty] Re: templating best practices

2009-04-22 Thread Maarten
On Apr 22, 5:49 pm, Richard Quadling rquadl...@googlemail.com 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

[Proto-Scripty] InPlaceEditor address arbitrary elements

2009-04-22 Thread Newb.aculo.us
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 ok,

[Proto-Scripty] Re: Observe div content change?

2009-04-22 Thread RobG
On Apr 22, 9:02 pm, Yozefff yoze...@gmail.com 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: URL:

[Proto-Scripty] Re: AJAX calls from multiple browser tabs at the same time:

2009-04-22 Thread NN
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

[Proto-Scripty] Re: the effect in Effect.toggle does not work

2009-04-22 Thread Ram
Hi Walter, Thanks for pointing me to the right resources. Im reading up on it here http://www.communitymx.com/content/article.cfm?page=2cid=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