SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Evangelist
    Join Date
    Jun 2001
    Location
    Houston, Texas, USA
    Posts
    559
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    input type = image

    Hi,

    How would I translate the following HTML into Rails?

    <input type="image" src="/images/button_create.gif" alt="Create" width="87" height="23" border="0" class="Buttons" />

    I was hoping to be able to use image_button, but I get undefined method.

    Any suggestions?

    Thanks in Advance!

  2. #2
    SitePoint Enthusiast Stevenwulf's Avatar
    Join Date
    May 2002
    Location
    Berkeley
    Posts
    76
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    From the rails API: http://api.rubyonrails.org/

    I'm not 100% positive about passing in {:alt, :height, and :width}

    Code:
        <%= image_submit_tag("button_create.gif", {:alt => "Create",
                                                                  :height => 23,
                                                                  :width => 87,
                                                                  :class => "Button"}) 
        %>

  3. #3
    SitePoint Evangelist
    Join Date
    Jun 2001
    Location
    Houston, Texas, USA
    Posts
    559
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's it! Thanks. Here's the final line:

    <%= image_submit_tag("button_create.gif", :size => "87x23", :alt => "Create", :border => "0", :class => "Buttons") %>


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •