How can I do something like this: <a id=a7 style="cursor: pointer;" onClick = "new Effect.Fade (''li''); Element.show(''a1'',''a2'',''a3'',''a5'',''a6''); onClick = "new Effect.Fade (''rp''); Element.show(''a1'',''a2'',''a3'',''a5'',''a6'');"> Hide Images</a> Whenever I do this it doesn''t work, Thanks in advance -- Posted via http://www.ruby-forum.com/.
Mohammad Surname? wrote:> How can I do something like this: > <a id=a7 style="cursor: pointer;" > onClick = "new Effect.Fade (''li''); > Element.show(''a1'',''a2'',''a3'',''a5'',''a6''); > onClick = "new Effect.Fade (''rp''); > Element.show(''a1'',''a2'',''a3'',''a5'',''a6'');"> Hide Images</a> > Whenever I do this it doesn''t work,What should it be doing? What are ''li'' and ''rp'', and why do you have two onClicks defined on a single element? -- Alex
<img src="/images/login.gif" id="li"><br> <img src="/images/rails.png" id="rp"><br> <a id=a7 style="cursor: pointer;" onClick = "new Effect.Appear (''li''); Element.show(''a1'',''a2'',''a3'',''a5'',''a6''); new Effect.Appear (''rp''); Element.show(''a1'',''a2'',''a3'',''a5'',''a6'');"> Veiw Images</a> | <a id=a7 style="cursor: pointer;" new Effect.Fade (''li''); Element.show(''a1'',''a2'',''a3'',''a5'',''a6''); onClick = "new Effect.Fade (''rp''); Element.show(''a1'',''a2'',''a3'',''a5'',''a6'');"> Hide Images</a> Sorry about that, If you hit veiw images it only show login.gif if you hit hide it hides rails.png so is there a way I could make it hide all of the images on one click? Without having to make a javascript funticion? -- Posted via http://www.ruby-forum.com/.
you can either use rails 1.1 & a rjs template (search in the list for some help about that), or write your javascript function (onclick="f()") On 4/16/06, Mohammad Surname? <name.goes.here44@gmail.com> wrote:> > <img src="/images/login.gif" id="li"><br> > <img src="/images/rails.png" id="rp"><br> > <a id=a7 style="cursor: pointer;" > onClick = "new Effect.Appear (''li''); > Element.show(''a1'',''a2'',''a3'',''a5'',''a6''); > new Effect.Appear (''rp''); > Element.show(''a1'',''a2'',''a3'',''a5'',''a6'');"> Veiw Images</a> | > <a id=a7 style="cursor: pointer;" > new Effect.Fade (''li''); > Element.show(''a1'',''a2'',''a3'',''a5'',''a6''); > onClick = "new Effect.Fade (''rp''); > Element.show(''a1'',''a2'',''a3'',''a5'',''a6'');"> Hide Images</a> > > Sorry about that, > If you hit veiw images it only show login.gif if you hit hide it hides > rails.png so is there a way I could make it hide all of the images on > one click? Without having to make a javascript funticion? > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060416/18c1bd42/attachment.html
Seemingly Similar Threads
- retrieve machine password in current Samba?
- Request: Most repeated sequence considering combinations at each row
- strange strsplit gsub problem 0 is this a bug or a string length limitation?
- getting variables based on name
- Cannot chain to another PXE server on the same subnet