Not working for me in Firefox
Sc0tt - March 24, 2008 - 01:09
| Project: | Image Caption |
| Version: | 5.x-1.1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Works great in Internet Explorer.
I'm using:
Drupal v5.8, php
MySQL database 4.1.22
PHP 5.2.4
Web server Apache/2.0.49 (Win32) PHP/5.2.4
and Firefox v2.0.0.12
I'm not sure what version of JQuery i'm using. I haven't installed the jquery module or made any attempts to upgrade beyond what comes with drupal v5.8.
This is how I'm using it by the way.
node.tpl.php file:
<div class="story_body"><img class="caption" src="/files/imagecache/640wide/files/Joe-Blow.jpg" title="Joe Blow, Director of Information Technology, Joe Blow Industries" align="right" style="padding-top:10px"></img><?php print $node->content['body']['#value'] ?></div>Thanks in advance for any help.

#1
I'd recommend taking out the closing
</img>tag from your template code there.i.e:
<div class="story_body"><img class="caption" src="/files/imagecache/640wide/files/Joe-Blow.jpg" title="Joe Blow, Director of Information Technology, Joe Blow Industries" align="right" style="padding-top:10px" />
<?php print $node->content['body']['#value'] ?>
</div>
That may help,
DT
#2
Thanks for the reply DT.
I removed the closing
</img>tag; but that didn't seem to help.Any other suggestions?
#3
can you check that the javascript file image_caption.js is being included in the head section of your page? (view source)
#4
David,
Thanks for the responce.
image_caption.js is NOT in my page.tpl.php file. Can you give an example of what this should look like? I assume its something like:
<head><script type="javascript" src="/sites/all/themes/mytheme/image_caption.js"></script>
</head>
When I tried this, the captions are now being writen twice.
Thanks again DT,
Scott
#5
have you got
print $scripts;in your page.tpl.php file?Do you have any other javascript files being included?
The image_caption.js file should be included automatically by the image_caption module so you shouldn't need to add it manually.
You should also check that your node type is included in the types for captioning in admin/settings/image_caption
#6
Thanks David,
Yes
print $scriptsis in my page.tpl.php file and no other javascripts are being loaded. The only script i have is the following to produce the current date<SCRIPT>var mydate=new Date()
var theYear=mydate.getFullYear()
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May","June","July","August", "September","October","November","December")
document.write(dayarray[day]+", "+montharray[month]+" "+daym+", "+theYear)
</SCRIPT>
And all of my node-types are included at admin/settings/image_caption.
It's all working just fine in IE; but FF is not. It's a strange one.
Thanks again Dave,
Scott
#7
David,
Thanks for your help.
I'm up against a deadline so I'm going to not use the module for this project. I've found an alternative solution that is not a nice as your module; but will work Ok.
Thanks again,
Scott
#8
Ok, odd that it works fine for me in IE and Firefox.
I suspect it's something else related to your Drupal configuration but I can't quite see it from here.
Good luck with your site,
DT