4 Replies - 953 Views - Last Post: 17 April 2012 - 07:34 PM

#1 mindiapolis  Icon User is offline

  • D.I.C Head

Reputation: -4
  • View blog
  • Posts: 175
  • Joined: 31-October 11

paypal buy now button not displaying in IE

Posted 17 April 2012 - 11:44 AM

If someone could help me with this problem I would really appreciate it. I'm working on a website in which firefox will display the paypal buy now button, but internet explorer will not. I copied and pasted the html document in the validator and I'm still getting a lot of errors due to the php code that is involved. There were several times when it said there was a missing closing tag so I went through the entire code and made sure every tag had a closing tag but still the buy now button won't appear in internet explorer. Any advice?

Attached File(s)



Is This A Good Question/Topic? 0
  • +

Replies To: paypal buy now button not displaying in IE

#2 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 4332
  • View blog
  • Posts: 12,127
  • Joined: 18-April 07

Re: paypal buy now button not displaying in IE

Posted 17 April 2012 - 12:33 PM

One little tip I suggest is that you never really break up tags using the PHP. For instance, instead of doing something like...

echo "<a href='http://www.";

if (blah == 1) {
   echo "example.com";
}
else {
   echo "helloworld.com";
}

echo "' name='myimage'>Domain Name</a>";



... you should try and keep the tag together and print it out at once...

if (blah == 1) {
   $domain = "example.com";
}
else {
   $domain = "helloworld.com";
}

echo "<a href='http://www.$domain' name='myimage'>Domain Name</a>";



This accomplishes a few things...

1) It keeps the tag together and easier to read
2) Limits the number of echo statements you have to write.
3) Prevents the possibility that things like carriage returns or line breaks are inserted in a string that probably shouldn't be there.
4) Helps prevent the possibility that at some point your if statement may print something it shouldn't and break up the format of your HTML tag.

Not saying this is the cause of your issue, but IE might be seeing your HTML tag as incomplete if it sees a line break or something in the link for your button. Firefox may accept it, but IE might be finicky.

To help further you might want to put it on the web somewhere and give us the URL so we can actually see the problem in action.

:)

This post has been edited by Martyr2: 17 April 2012 - 12:34 PM

Was This Post Helpful? 0
  • +
  • -

#3 mindiapolis  Icon User is offline

  • D.I.C Head

Reputation: -4
  • View blog
  • Posts: 175
  • Joined: 31-October 11

Re: paypal buy now button not displaying in IE

Posted 17 April 2012 - 12:45 PM

thank you for the kind response. You can see the page at http://auntievics.com/checkOut.php Unfortunately you will need to fill out the form and press submit before you will see the paypal button. I had to do this because some of the information had to go in the database before going to Paypal.
Was This Post Helpful? 0
  • +
  • -

#4 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 4332
  • View blog
  • Posts: 12,127
  • Joined: 18-April 07

Re: paypal buy now button not displaying in IE

Posted 17 April 2012 - 01:01 PM

Make sure you also specify a height and width for the image. You have width="" and height="". Either leave them out altogether or specify the values. IE apparently has an issue with them being put in and set to empty strings.

This should fix your problem. :)
Was This Post Helpful? 0
  • +
  • -

#5 mindiapolis  Icon User is offline

  • D.I.C Head

Reputation: -4
  • View blog
  • Posts: 175
  • Joined: 31-October 11

Re: paypal buy now button not displaying in IE

Posted 17 April 2012 - 07:34 PM

That did the trick! Thank you so much for the help!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1