Be patient
Instead of trying to upload directly from iPhoto, put the pic on your desktop. When the browser upload window opens, click Browse, and select the pic from the d/t (but you probably know this procedure anyway).
Secondly, there may be an issue with your membership privileges on the hosting site, eg. Facebook. Make sure you have the appropriate cookies enabled so that the host site can check your membership details. Don't worry, it's all safe.
As to your OP and "the pics viewed stays on the screen", I'd suggest that your MacOS needs some maintenance. Use OnyX to repair permissions and run maintenance scripts.