Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

PayPal Working in FireFox but not IE7

  • 28-06-2007 03:18PM
    #1
    Registered Users, Registered Users 2 Posts: 527 ✭✭✭


    Ok so I thought I was finished my site.. I checked my page out in IE7 and I get the following message when I click the PayPal image/button.

    Session contains invalid data.

    I have 2 pages. Calc.html and success.html
    The value from a textfield in Calc is written to a cookie and then retrieved from the success page and passed to the PayPal form.
    Note the value of the textfield is a number in the format xx.xx

    Some code from Calc: (this works fine)
    function createCookie(name,value,days) {
    		if (days) {
    			var date = new Date();
    			date.setTime(date.getTime()+(days*24*60*60*1000));
    			var expires = "; expires="+date.toGMTString();
    		}
    		else var expires = "";
    		document.cookie = name+"="+value+expires+"; path=/";
    	}
    	
    	function readCookie(name) {
    		var nameEQ = name + "=";
    		var ca = document.cookie.split(';');
    		for(var i=0;i < ca.length;i++) {
    			var c = ca[i];
    			while (c.charAt(0)==' ') c = c.substring(1,c.length);
    			if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    		}
    		return null;
    	}
    	
    	function eraseCookie(name) {
    		createCookie(name,"",-1);
    	}
    
    createCookie('ppCookie',bookingDep2,1);
    


    Som code from success:
    function setPPamount(){
    		var x = readCookie('ppCookie');
    		alert("Booking Deposit = &#8364;"+x);
    		document.ppForm2.amount.value = x;
    		eraseCookie('ppCookie');
    		
    }
    ...
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post" name="ppForm2" id="ppForm2">
      <input type="hidden" name="cmd" value="_xclick" />
              <input type="hidden" name="bn" value="webassist.dreamweaver.4_0_3" />
              <input type="hidden" name="business" value="........" />
              <input type="hidden" name="currency_code" value="EUR" />
              <input type="hidden" name="undefined_quantity" value="0" />
              <input type="hidden" name="receiver_email" value="........" />
              <input type="hidden" name="mrb" value="....." />
              <input type="hidden" name="pal" value="......" />
              <input type="hidden" name="no_shipping" value="0" />
              <input type="hidden" name="no_note" value="0" />
              <input type="hidden" name="item_name" value="......" />
              <input type="hidden" name="amount" value= "" />
              <input type="image" name="ppButton" id="ppButton" src="http://images.paypal.com/images/x-click-but6.gif" border="0" alt="Make payments with PayPal, it's fast, free, and secure!" style="display:visible" onClick="setPPamount()"/>
    </form>
    

    It's strange that this works no problem in Firefox but yet IE7 I get that invalid session data error.

    Any help would be really appreciated before I remove anymore clumps of hair.

    Thanks


    Seán


Comments

Advertisement