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.
on 2008-06-21 17:43
on 2008-06-21 18:51
Hi, Just to reassure anyone reading your thread title, Ajax.Updater *does* work with Safari 3.1.1 and *does* pass the parameters (I just double- checked), at least on Windows XP. The problem appears to be with what you're doing with it, so you'll want to break your code down to its simplest bits and then build it up until you find what's breaking. -- T.J. Crowder tj / crowder software / com