# Help on implementing rails from html with php

**URL:** <https://www.ruby-forum.com/t/help-on-implementing-rails-from-html-with-php/53130>\
**Category:** Rails\
**Created:** [January 26, 2006, 4:41am UTC](https://www.ruby-forum.com/t/help-on-implementing-rails-from-html-with-php/53130 "2006-01-26T04:41:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![burninglegion](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3bc359/32.png) [@burninglegion](https://www.ruby-forum.com/u/burninglegion)\
**Post date:** [January 26, 2006, 4:41am UTC](https://www.ruby-forum.com/t/help-on-implementing-rails-from-html-with-php/53130/1 "2006-01-26T04:41:24Z")

</div>

Hi guys, just started using rails and is trying to implementing the  
present html with some rails…

However i met this problem when i am trying to port over some php code  
in html to rails and i cant find any method to successful convert the  
php codes.

Below is a feature i tried to implement in rails way:

there are 2 buttons on the html. Besides these 2 buttons is an infobox.  
So, whenever one of the buttons is pressed, the infobox have to show the  
respective information assigned to each button. At any one time, only  
one button can be pressed and the infobox have to change the information  
displayed inside it accordingly and immediately.

Here is the code i did and not sure wat’s wrong:

button info

## Info

**Button1** some text here 

**Button2** some text here 

2 buttons Button 1 Button 2

Thanks for any help anyone can provide me.

---

<div class="post-metadata">

**Author:** ![burninglegion](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3bc359/32.png) [@burninglegion](https://www.ruby-forum.com/u/burninglegion)\
**Post date:** [January 26, 2006, 10:14am UTC](https://www.ruby-forum.com/t/help-on-implementing-rails-from-html-with-php/53130/2 "2006-01-26T10:14:30Z")

</div>

bao lee wrote:

> Hi guys, just started using rails and is trying to implementing the  
> present html with some rails…

Anyone can help???

---

<div class="post-metadata">

**Author:** ![burninglegion](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3bc359/32.png) [@burninglegion](https://www.ruby-forum.com/u/burninglegion)\
**Post date:** [January 26, 2006, 1:04pm UTC](https://www.ruby-forum.com/t/help-on-implementing-rails-from-html-with-php/53130/3 "2006-01-26T13:04:18Z")

</div>

bao lee wrote:

> Hi guys, just started using rails and is trying to implementing the  
> present html with some rails…

Firstly, you’ve given the buttons the same IDs as the divs they’re  
referring to. That can’t work. Secondly, you’ve not taken care of  
making anything disappear. Thirdly, Effect.Appear() et al need to be  
called as constructors. Finally, although it’s understandable that you  
aren’t aware of it, the correct list for this question would be  
removed\_email\_address@domain.invalid, because it’s a scriptaculous  
problem rather than about Rails itself.

Oh, the code? Try this: 🙂

 button info 
## Info

**Button1** some text here 

**Button2** some text here 

 2 buttons Button 1 Button 2 

Tested to be fine in Firefox, although I’ve jiggled your tree a bit, so  
to speak.

---

<div class="post-metadata">

**Author:** ![burninglegion](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3bc359/32.png) [@burninglegion](https://www.ruby-forum.com/u/burninglegion)\
**Post date:** [January 27, 2006, 2:39am UTC](https://www.ruby-forum.com/t/help-on-implementing-rails-from-html-with-php/53130/4 "2006-01-27T02:39:15Z")

</div>

Alex Y. wrote:

> bao lee wrote:
> 
> > Hi guys, just started using rails and is trying to implementing the  
> > present html with some rails…
> 
> Firstly, you’ve given the buttons the same IDs as the divs they’re  
> referring to. That can’t work. Secondly, you’ve not taken care of  
> making anything disappear. Thirdly, Effect.Appear() et al need to be  
> called as constructors. Finally, although it’s understandable that you  
> aren’t aware of it, the correct list for this question would be  
> removed\_email\_address@domain.invalid, because it’s a scriptaculous  
> problem rather than about Rails itself.

Oh sorry about that… didnt know that the nature of the problem is not  
rails itself… thanks for all your trouble.
