Hi guys,

I am trying to solve a problem with Ajax.Updater on Safari 3.1.1, can
someone please help me.

Here is my js code:

var custnumCookie   = readCookie('CustomerId');
var custtypeCookie  = readCookie('CustType');
var emailCookie     = readCookie('EmailId');
var firstnameCookie = readCookie('FirstName');
var lastnameCookie  = readCookie('LastName');
var itemcountCookie = readCookie('ItemCount');
var keycodeCookie   = readCookie('keyCode');

var canlogout = false;
var ajaxWorksheet = "";

if (custnumCookie && emailCookie && firstnameCookie && lastnameCookie)
canlogout = true;

function requestCart(parm)
{
  if ($('worksheet'))
  {
    if (parm=="login=true" && $('signinform'))
    {
      var parms='action=logonEmailCustomerAjax&'+$
('signinform').serialize(false);

    } else {

      if(canlogout)
      {
        var parms = 'action=logonEmailCustomerAjax&email='+emailCookie
+'&firstName='+firstnameCookie+'&lastName='+lastnameCookie
+'&customer='+custnumCookie+'&keyCode='+keycodeCookie;

      } else {
        parms = 'iafAction=showCartSummary';

      }
    }

    $('worksheet').innerHTML="<h2 align='center'>Welcome!</h2><p
class='loading'>Loading... <img src='/images/ajax-loader.gif'
alt='Loading...' border='0'></p>";
    ajaxWorksheet   = new Ajax.Updater('worksheet', '/cart/
dispatcher', {parameters: parms });
    if (parm=="login=true")
setTimeout('window.location=window.location',1000);     // refresh
page after 1 second if login was just done

    setTimeout('mySlowInit()',1000);

   }

} // end requestWorksheet


My JSP page:

        <form method="post" id="signinform" onSubmit="return
requestCart('login=true')">
                <label for="email">Email Address:</label>
                <input type="text" name="email">
                <label for="password">Password:</label>
                <input type="password" name="password">
                <button name="submitButton" type="submit"
class="button-submit">Sign in</button>
        </form>


This code works on Firefox, IE6, IE7 and Opera, It doesn't work on
Safari.

Thanks in advance :)

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

Reply via email to