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

2009-04-27 Thread Ram
At last, a fairly large hint. With the following code, when I put the Javascript inline, the effect works. Whereas if I put it in an external JS file, include that in the head and call the function (like shown below), it doesnt work. HTML Source !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0

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

2009-04-27 Thread Walter Lee Davis
What does Firebug say, specifically, when a function fails to run? Does it error at all? Can you put breakpoints in your code (or alert statements) and see if it is being called? You say that there are other functions which work fine, are they in the same application.js file? Walter On

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

2009-04-27 Thread Vinay Seshadri
Hi Walter, Ive solved the problem!! AWOOHOO!! :) ok you're probably gonna punch me but I really have no idea why this is happening. I use this helper method javascript_include_tag :defaults to include my default javascripts in my head tag. This method is in-built in Rails and it generates the

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

2009-04-27 Thread Walter Lee Davis
Hmmm. Well, that's odd, but chalk one up to Rails and its development/ test/production environments. The querystring at the end of the filename is there to force the browser to get a newer version of the script. That number is the current time in Unix time() mode, I think, or it may be

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

2009-04-27 Thread Vinay Seshadri
Hmmm. Im not sure. This wasnt working for me in dev or production. And the timestamps are there in both environments.You are right about what theyre meant for though. I read about it here http://ahref.in/79887 Its explained a bit more in detail in the API under the Using Asset Timestamps section

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

2009-04-25 Thread Vinay Seshadri
Hi Walter, I downloaded the latest S 1.8.2 and P 1.6.0.3 and replaced the versions i had (P 1.6.0.1 and S 1.5.x) with those. I dint realize giving the same ID to multiple divs will cause problems!! sorry.. my bad.. i removed the IDs like you had in jsbin.com/abufa the div inside the form with the

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

2009-04-25 Thread Vinay Seshadri
I created a super simple (more like as simple as possible) page in my app for the effect alone. Effect isnt working in my app but its working here http://jsbin.com/etela here's ultra simple http://jsbin.com/ipudi Even THIS isnt working at my end!! What the hell is going on??? Its amazing! I

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

2009-04-25 Thread Walter Lee Davis
Can you go to the tab where you see it broken, view source, copy and paste it into http://validator.w3.org/#validate_by_input and see if there's anything up there? Prototype is sensitive to standards, and you may eliminate some of your problem by starting with a clear page. Walter On Apr

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

2009-04-24 Thread Vinay Seshadri
Hi Walter, Ill do that. It might take a little time though. Half a day? Also, in the meanwhile, im using toggle.slide elsewhere in the app but im using RJS there and not pure JS. That is giving me the same problem. I thought ill post that code too in case it helps.. so here it is.. the main html

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

2009-04-24 Thread Vinay Seshadri
Hi Walter, Ive put up my code here http://jsbin.com/ucebi. The funny part is, its working there. im not able to replicate the behaviour i get at my end. http://jsbin.com/ucebi/edit should show u the code. Do take a look. Thanks! On Fri, Apr 24, 2009 at 12:24 PM, Vinay Seshadri

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

2009-04-24 Thread Walter Lee Davis
diff yours against this one: http://jsbin.com/abufa/edit Your HTML wasn't valid at all, there are tags opening and closing out of order, and all of your comments have the same ID. I am not sure if this tells you anything you didn't know, it can be hard to work in an abstraction and fix

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

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

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

2009-04-23 Thread Vinay Seshadri
I DO have that in my main stylesheet Mona..and I have .clearfix {overflow:auto} within style tags in my html layout page. here's exactly what i have now.. main.css .clearfix:after { content:.; display:block; height:0; clear:both; visibility:hidden; } .form { padding: 1em; border:

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

2009-04-23 Thread Mona Remlawi
ok time for jsbin i created 2 pages abrupt transition: http://jsbin.com/aposu smooth transition: clearfix applied: http://jsbin.com/ugiju test and see if we are talking about same abnormal behaviour cheers -- mona mreml...@optaros.com On Thu, Apr 23, 2009 at 9:13 AM, Vinay Seshadri

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

2009-04-23 Thread Vinay Seshadri
abrupt transition: http://jsbin.com/aposu in that, the way the div is hidden, abruptly, is what I am seeing in my application. the showing of the div seems to be fine in this link though. Only the hiding of the div is abrupt and thats what I see in both hiding AND showing of MY comms div. On Thu,

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

2009-04-23 Thread Mona Remlawi
ok then, i give up, no more tricks up my sleeve. cheers -- mona mreml...@optaros.com On Thu, Apr 23, 2009 at 10:22 AM, Vinay Seshadri yourstruly.vi...@gmail.com wrote: abrupt transition: http://jsbin.com/aposu in that, the way the div is hidden, abruptly, is what I am seeing in my

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

2009-04-23 Thread Ram
thanks a lot Mona. I appreciate the effort anyway :) Guess this really is a fringe case.. Anyone else got any ideas? On Apr 23, 1:56 pm, Mona Remlawi mona.reml...@gmail.com wrote: ok then, i give up, no more tricks up my sleeve. cheers -- mona mreml...@optaros.com On Thu, Apr 23, 2009

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

2009-04-23 Thread Walter Lee Davis
Give the effect a ridiculously long duration, and watch the element in Firebug while it animates. You can see the CSS properties change as it does (a little delayed, like the stock market ticker, I suppose). You may see the answer there, but that's about all I can offer too. Walter On Apr

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

2009-04-23 Thread Vinay Seshadri
Hi Walter, Tried what you suggested. I watched this line under the HTML tag in Firebug div id=comments-section class=form style=display: none; When I click on toggle to SHOW, the 'style' changed to 'overflow: visible;' like so div id=comments-section class=form style=overflow: visible; When I

[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: 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] 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: 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: 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: 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