JavaScript not running in Drupal Block... same script works in Xoops HTML block
domineaux - October 15, 2007 - 02:47
I had a Content Block working great with a JavaScript Slideshow.
Reinstalled the script and did everything I can think of to get the script to run.
It will not run now. The script is working in an Xoops CMS HTML block on the same server and browser.
I check block size width against script size and width as well.
Any suggestions would be appreciated
Thanks
-------------------------------

=-=
insure you switched the input format to FULL HTML before submitting the content into the block.
_____________________________________________________________________
Confucius says:
"Those who seek drupal answers should use drupal search!" : )
The Full HTML is selected. I
The Full HTML is selected.
I installed the TinyMCE, which may be the problem. I don't see the text in the TinyMCE box, but I do when I disable it.
When I click the HTML button in the TinyMCE control I get a popup with the HTML javascript code identical to the code I see when I disable it.
I hate to disable the TinyMCE I had a terrible time installing the thing. LOL
The script is working in the Xoops CMS on the same server and using same browser.
=-=
I suggest disabling TinyMCE , at least on that path, to insure TinyMCE is not interferring. Last time I tested TinyMCE you could tell it where it was allowed to show and where it wasn't using path visibility. stop it from showing. Or at least to test, disbale the module.
While I understand that tinymce may be showing you the correct code, you don't know what TinyMCE is doing when the code is being saved.
Have you viewed the souce of the empty block ?
are line breaks being inserted which may be affecting the code ?
_____________________________________________________________________
Confucius says:
"Those who seek drupal answers should use drupal search!" : )
You need to use the PHP input filter
The HTML filter only allows HTML, the PHP filter besides allowing PHP will allow both HTML and javascript.
I tried it FUll HTML... PHP
I tried it FUll HTML... PHP and no go.
I even added the
<?php--- then script -----
?>
The script is working on the same server on an Xoops site HTML block. It's a left side block 185w x246H with a little slideshow javascript that cycles through some images in the block. In other words, the script is fine it works.
I put a title for the block and it even prints the block title, but no JS.
A URL to site would help
Lacking a URL to the site, is the javascript getting output as part of the block, is the script the javascript relies on getting loaded?
I've been having problems
I've been having problems with Themes crossover issues, cached stuff, etc. I'm thinking there may be something going on with the way blocks and themes get rendered with various theme situations.
This block worked with the javascript initially after I installed it. I did have alot of problems with the TinyMCE getting it installed, and I've had a bunch of theme issues. I mean like menus being in strange places, etc. LOL
I've moved back to the "Garland" default theme for now, and the next thing I'm doing is removing the TinyMCE and other modules. I'm just going to build the blocks and other content with HTML editor for the time being.
I certainly appreciate all the reponses and interest. If I resolve this... I'll be sure to document it with this thread.
======================
Voila! I removed the TinyMCE and now my Javascript works in the block.