View field with JavaScript code in it I have content type which has text field. Each node has its own javascript code which is set in to the text field. Text field is PHP Code format.

When I add this field to Views block site load ONLY the javascript in that text field. Whole other drupal content is not loaded. When I remove this field from views then site works normally.

This script works on full node but not in the Views. What can cause this? What ways to fix it?

Script is from Tradedoubler (third party advert) :

&lt;script type="text/javascript"&gt;
  var uri = 'http://url.com' + new String (Math.random()).substring (2, 11);
  document.write('&lt;sc'+'ript type="text/javascript" src="'+uri+'" charset=""&gt;&lt;/sc'+'ript&gt;');
&lt;/script&gt;
Try using the Views PHP module. First, make the field with the javascript be excluded from the display (check the box for this, don't delete the field). Then add a php field to the view, and then have it print the field with the javascript via the replacement pattern. You can also use PHP to manipulate it, write more javacript, etc. This is the only way I have found to add javascript to view rows.