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 authenticity token is auto generated by Rails. the authenticity token is wrapped in its own div and there's nothing much i can do about that. I wrapped the rest of the form elements in a div though. and the div with the float:right property that i had commented out in each comment.. i removed that completely!
All this and still no luck! I really wouldnt blame you if you gave up on me now :). If you have no other suggestions, could you tell me how else i could make this workflow neat in my app? One possible solution would be to use a lightbox.. but if the number of comments is really high, then it would look very awkward indeed.. On Fri, Apr 24, 2009 at 6:54 PM, Walter Lee Davis <[email protected]>wrote: > > 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 problems in the output. So I'm > not sure how you go about working these changes back in. > > As to why your local code doesn't work while the jsbin does begs the > question: are your gems up to date? Are you using the very latest > versions of P & S? > > Walter > > On Apr 24, 2009, at 6:21 AM, Vinay Seshadri wrote: > > > 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 < > [email protected] > > > wrote: > > 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 page > > > > ... > > <div class="formwrapr"> > > <%= check_box :options, :send_mail, {}, "true", "false" %> Send > > email updates? > > <%= observe_field :options_send_mail, :url => {:action => > > 'do_magic'}, :method => :get %> > > <div id="send_mail_fields" <% if !options.send_mail?%> > > style="display:none;"<%end%>> > > <% fields_for :mail, @options.mail do |@mail_fields| %> > > <%=render :partial => 'mail'%> > > <% end %> > > </div> > > </div> > > ... > > > > So if the user has already asked for sending email updates > > previously, this div will be shown, otherwise, it wont. When the > > check box is handles, a controller action called 'do_magic' is > > called. There's no code in there. It just defaults down to > > do_magic.rjs, a template where i have the following line of RJS code > > which basically gets translated to the obvious JS. > > > > page.visual_effect :toggle_slide, :send_mail_fields > > > > The following is the content of the 'mail' partial which is rendered > > within "send_mail_fields" > > > > Every > > <%= @mail_fields.collection_select :frequency_in_days, > > Duedate.find(:all), :no_of_days, :no_of_days, > > {:include_blank=>true}, :index => nil %> days | > > > > How many comments? > > <%= @mail_fields.text_field :no_of_comments, :size => 5, :index => > > nil %> > > > > I DONT have the above content wrapped in an enclosing div. Just a > > point to note. > > This as i mentioned before, gives me the same problem. Maybe it helps. > > > > Thanks Walter.. will get back after i find a place to post a working > > example of my code. > > > > On Fri, Apr 24, 2009 at 11:49 AM, Walter Lee Davis > > <[email protected]> wrote: > > > > I've tried a simple example here, and the only way I can get it to > > break is if I try to slide an empty DIV up and down. Clearly that's > > not your problem here. > > > > Is there some way you could post a cut-down example somewhere live? > > Run your Rails app locally, view source, copy and paste into a text > > editor, and fix up the paths to the scripts. (Use Googles CDN, f.e.) > > Post that somewhere we can look at it and click on it. > > > > Walter > > > > On Apr 24, 2009, at 1:11 AM, Vinay Seshadri wrote: > > > > > 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;"> > > > > > > > > > > > > -- > > In Sport We Trust !!! > > > > > > > > -- > > In Sport We Trust !!! > > > > > > > > > > -- In Sport We Trust !!! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
