views:

30

answers:

1

Hi,

I am having a weird browser issue - works fine with FF, chrome but not in IE

What I am trying to do is dynamically form the html for printing a coupon - and a part of it is a link redirecting to another page

onclick = String.Format("javascript:PostBackCoupon123('{0}','{1}');", zipCode, cityName);
couponContent.AppendFormat("<a border=\"0\" style=\"color:#FFFFFF\" href=\"{0}\">", onclick);  

In all three browsers, the coupon is displayed correctly, but in IE alone - clicking on coupon does not redirect.

Initially I thought the problem could be the Javascript (as is the case usually..). But after breaking my head for 3 days over this, I think this could be because of session variables being lost - I am suspecting this because when I try to refresh the coupons are all lost in all three browsers.

Has anyone faced similar problems before? Can anyone take a guess on what this could be due to?

Thanks, Mina

The JS is given below: function PostBackCoupon123(zipcode, city) {
document.getElementById("ctl00_ContentPlaceHolder1_UCCoupon1_hdnZipcode").value =
zipcode; document.getElementById("ctl00_ContentPlaceHolder1_UCCoupon1_hdnCity").value = city;
_doPostBack('_Page', 'MyCustomArgumentCoupon');
return false; }

A: 

@Rob, Thx

function PostBackCoupon123(zipcode, city) {
document.getElementById("ctl00_ContentPlaceHolder1_UCCoupon1_hdnZipcode").value =
zipcode; document.getElementById("ctl00_ContentPlaceHolder1_UCCoupon1_hdnCity").value = city;
_doPostBack('_Page', 'MyCustomArgumentCoupon');
return false; }

Mina