By askttt on
A 3rd party has supplied me with various content via javascript. However, I can't get the code to display except as an HTML Ad from the Advertising module. I'd like to create a content type for these various script but need to know how to get them to display as a node. I'm sure there's a quick fix, but I can't seem to find it. The code :
<script type="text/javascript" src="http://www...../iframescript.js"></script>..................../form><iframe id="searchResults" name="iframe2_eLSzIvAI" height="650" width="240" align="middle" style="background-color:#FFFFFF" src="javascript:false;"></iframe><script>searchNow("eLSzIvAI");</script>
Edited by: VeryMisunderstood; Added code tags around stripped HTML
Comments
Output filter
Set output filter for that page to full html.
- Alexei Rayu.
Drupal Related Services | SiteHound Drupal Free Distro
Output filter
Nope.........Contrary to popular belief, the correct answer is to set the filter to PHP.
Don't know why....but it works.
security concern
I wouldn't let content from a 3rd party be displayed in a php-enabled field. If the code you pasted above is verbatim, you've got linebreaks in there that the default full HTML filter is probably converting to p-tags. The default php filter doesn't convert line breaks. Try creating a new filter that doesn't convert linebreaks and see if that works.
creating a new filter
Don't have a clue as to how to create a filter. Can you point me somewhere?
/admin/settings/filters/add -
/admin/settings/filters/add
- Alexei Rayu.
Drupal Related Services | SiteHound Drupal Free Distro
New filter
WAY easier than I imagined! Thanks
Drupal's cool!
Yes. Drupal seems a monster, but once you learn it it's easy and it's beautiful. In contrast, I had to spend quite some time with Joomla, which looks like a beauty at the first glance, but then when you start asking questions, the harder question you ask, the more "no's" you hear.
- Alexei Rayu.
Drupal Related Services | SiteHound Drupal Free Distro