SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    May 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    'submit_tag' not working in IE7

    Hi-

    After initially developing and testing my small app using firefox (on ubuntu) and finding everthing to work, I tried it on IE7 on windows with Instant Rails. To my surprise a simple non-ajax form ceased to work. The submit button has no effect. Here is my ridiculously simple form view; the form partial consists of nothing more than a few label/textfield tag pairs.
    Does anyone know why this would work in firefox but not in IE7?

    Code:
    <div id="login" class="boxed">				
      <div class="content">  
        <% form_for :game, @game, :url => {:action => 'create'} do %>
          <%= render :partial => 'form' %>
          <%= submit_tag 'Submit' %>
        <% end %>    
      </div>
    </div>

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Did you click on the submit button or did you hit enter from the text box?
    IE does not send the submit button unless it is clicked on or tabbed then enter.

    I am assuming you are checking for the submit button in Ruby when the form is submitted. I don't know how it works in Ruby but in PHP I always check that a required field was submitted or I add a hidden field and check that.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    SitePoint Member
    Join Date
    May 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I definitely clicked on the button...you don't actually check for a submit button in Rails but the hidden field idea might be worth following up on...this is a very strange problem indeed.
    Thx.

  4. #4
    l 0 l silver trophybronze trophy lo0ol's Avatar
    Join Date
    Aug 2002
    Location
    Palo Alto
    Posts
    5,329
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Code looks fine, so I'd guess it might be something else. Does your request actually hit your app, or doesn't IE7 make a request at all?


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
  •