View file has a js function "confirm_result()" in <head> section:

<script type="text/javascript">
    function confirm_action()
    {
      result = confirm("Please select OK or Cancel")
      if (result == true)
        document.write("You selected OK.")
      else
        document.write("You selected Cancel.")
    }
  </script>

The <body> section has

<input type="button" onclick="confirm_action()" value="Submit">

Works just fine in IE7 and FireFox3.

But not in Chrome 1 or Safari 3. In the latter two the confirm box
appears, then a new blank page without the "You selected..."  text. Js
otherwise working fine


Has anyone else encountered this? Bug in Rails? Chrome? Safari?
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to