Code working normally in a fresh HTML file but not in a Drupal block Just wondering if someone would be kind enough to help me with a problem i am having.

This is the code that i am currently using for my E-junkie View Cart button on my Drupal site:

&lt;a href="https://www.e-junkie.com/ecom/gb.php?c=cart&amp;cl=206570&amp;ejc=2" target="ej_ejc"       class="ec_ejc_thkbx" onClick="javascript:return EJEJC_lc(this);"&gt;&lt;center&gt;&lt;img src="http://www.e-junkie.com/ej/ej_view_cart.gif" border="0" alt="View Cart"/&gt;&lt;/center&gt;&lt;/a&gt;
&lt;script language="javascript" type="text/javascript"&gt;
&lt;!--
function EJEJC_lc(th) { return false; }
function EJEJC_config() {
EJEJC_POSTCALL=true;
}
function EJEJC_shown() {
jQuery("#imgHeader").attr("src", "http://www.eastwestcards.com/banner2.png");
}
// --&gt;
&lt;/script&gt;
&lt;script src='http://www.e-junkie.com/ecom/box.js' type='text/javascript'&gt;&lt;/script&gt;


When i use this code on a normal HTML page the pop up is very nice and clean. However, when i try to use this code in a block on drupal the pop-up still works but there is no banner and the tables for the shopping cart all messy and etc.

Another thing that I am wondering about is my twitter feed doesn't work.

I have tried enabling the PHP module and set the input filter to PHP code and the twitter feed now shows but i am unsure if this is an efficient way to fix the problem. When i did this for the code above the banner of my cart started showing but the tables and etc. were still messed up.

I've been reading some FAQs and some people are suggesting that I should make exceptions in my theme's CSS files so that it does not affect the pop-up cart on my site but I do not know how to do this.

Apologies for the chunks of text, thank you in advance for any help.
Inputing PHP or Javascript through the UI is almost always a bad idea, and can happen to be impossible in some cases, for security reasons. 

I recommend another approach, for example creating a block in a custom module with the various block hooks.

This way, you won't bypass Drupal security and you'll have a much more versatile and robust solution.