Hi, I am trying to hide a "intro" text shown to user the first time after he has made a search, in the website with RJS/Prototype "hide". I get the following error: RJS Error: Type Error: element has no properties. The text I would like to hide is in a div called "intro" and in my RJS I tried: - page.hide[:intro] as well as - page.hide ''intro'' But I get the above error. I guess I miss something. Any hints are appreciated! Thanks, Hari -- View this message in context: http://www.nabble.com/RJS%3A-hide-element-problem-tf2028301.html#a5578175 Sent from the RubyOnRails Users forum at Nabble.com.
> The text I would like to hide is in a div called "intro" and in my RJS I > tried: > - page.hide[:intro] as well as > - page.hide ''intro''1. Are you sure there is only one element with the id ''intro'' in your final rendered view? (i.e after iterating records) 2. If you''re doing the following, I can''t imagine what might be wrong... render(:update) do |page| page.hide ''intro'' end Hope it helps, sounds rather strange though :) Goodluck Gustav Paul gustav@rails.co.za itsdEx.com -- Posted via http://www.ruby-forum.com/.
Thanks Gustav for the tip. I just found what mistake I did: <div class="intro> instead of <div id="intro> duh! Regards, Hari -- View this message in context: http://www.nabble.com/RJS%3A-hide-element-problem-tf2028301.html#a5578618 Sent from the RubyOnRails Users forum at Nabble.com.