PDA

View Full Version : Text/image Crawler



ronpaul53
12-19-2009, 05:53 PM
1) Script Title: Text Image Crawler

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex2/crawler/index.htm

3) Describe problem: Have used this script for a while, however I have recently been informed that it is NOT visible in either Firefox or Chrome. I have installed both current editions of browsers to check and find that they
are not displaying. Any suggestions would be appreciated.
I have since found I can get it to dispaly however NOT in position required. It seems as though it does not like 'position' tag
url: www.patchambridgeclub.org.uk/header2010.htm and www.patchamcommunitycentre.org.uk/navbar3.htm
Can ANYONE HELP

jscheuer1
12-19-2009, 09:11 PM
Works fine here in those browsers, check them against the demo page. If the demo page works in those browsers for you, it's probably something about your implementation if so:

Please post a link to the page on your site that contains the problematic code so we can check it out.

It's also possible that those browsers' settings are preventing it from working. Mine use the defaults, and the demo page works fine here in them.

ronpaul53
12-22-2009, 08:24 PM
Thanks John, have checked it as you say, although prior to that tried a 'bare'
page and the crawler does work as you say.
It appears it has something to do with position, I have tried several different settings, to no avail, have update original post with url's but they are
www.patchambridgeclub.org.uk/header2010.htm
&
www.patchamcommunitycentre.org.uk/navbar3.htm
any help would be appreciated

jscheuer1
12-23-2009, 11:16 AM
That layout is a nightmare! I only looked at your header2010.htm page. For that, use this for the crawler:


<div class="marquee" id="mycrawler">
<div style="width:580px;margin-top:-1.3em;">New Years Eve - are you playing? - let us know</div>
</div>
<script type="text/javascript">
marqueeInit({
uniqueid: 'mycrawler',
style: {
'width': '578px',
'height': '19px',
'background-color': '#8FB452',
'color': '#2B3718',
'font-family': 'Boulevard SF',
'font-size': '12pt',
'font-weight': 'normal'
},
inc: 1 //speed - pixel increment for each iteration of this marquee's movement
});
</script>

And add this (highlighted) to your style section:


<style type="text/css">
body { margin: 0em 1.04em 0em 0em }
#dateCal {
width: 143px;
height: 20px;
position: relative;
top: -90px;
right: 436px
}
.marquee0 {
position: relative;
top: -109px;
right: 2px;
}
</style>

One thing I don't know about is that font (Boulevard SF). I don't have that on my system and I doubt many others do. What I saw was Times New Roman, so your results may vary. Generally it's best to stick to generic fonts. In this case that would be 'serif'. That way, what you see is more likely to be what others will see. However if you actually have 'Boulevard SF' in your browser and it works out, you can keep it, as those without it will likely see what I saw, which also worked out.

ronpaul53
12-23-2009, 05:05 PM
Thanks John, have tried your suggestion, however it now doesn't appear at all not even in IE.
Regarding the FONT it is actually embeded so I'm bewildered why it isn't showing as that.

jscheuer1
12-23-2009, 06:00 PM
It works here, you haven't followed my instructions. You have:


<div class="marquee" id="mycrawler">
<div style="width:580px; margin-top:-1.3em;">
New Years Eve - are you playing? - let us know</div>
</div>
<script type="text/javascript" language="javascript">
marqueeInit({
uniqueid: 'mycrawler',
style: {
'width': '580px',
'height': '19px',
'background-color': '#8FB452',
'color': '2B3718',
'top': '-109px',
'right': '2px',
'font-family': 'Boulevard SF',
'font-size': '12pt',
'font-weight': 'normal'
},
inc: 1, //speed - pixel increment for each iteration of this marquee's movement
});
</script>

I have:


<div class="marquee" id="mycrawler">
<div style="width:580px;margin-top:-1.3em;">New Years Eve - are you playing? - let us know</div>
</div>
<script type="text/javascript">
marqueeInit({
uniqueid: 'mycrawler',
style: {
'width': '578px',
'height': '19px',
'background-color': '#8FB452',
'color': '#2B3718',
'font-family': 'Boulevard SF',
'font-size': '12pt',
'font-weight': 'normal'
},
inc: 1 //speed - pixel increment for each iteration of this marquee's movement
});
</script>

I see no evidence of an embedded font (didn't really look very far), how are you doing that? Some font embedding is browser specific.

ronpaul53
12-23-2009, 11:51 PM
Thanks John, my apologies thought I had taken out the positioning tags.
However you are right it now works in Firefox & Chrome but unfortunately it
no longer works in IE8 or compatibility mode.
Regarding font embedding, settings are in style sheet

jscheuer1
12-24-2009, 12:19 AM
My PC with IE 8 on it is currently unavailable. However, your layout is so non-standard, that I'm not too surprised. Without a valid URL DOCTYPE, IE 8 will be thrown into quirks mode. In compatibility mode though, if it renders as the page would be rendered in IE 7, it should work. But that DOCTYPE may prevent true compatibility mode. I will have my IE 8 PC back online (it's just in the other room, nothing wrong with it) soon, as I will need it for something else. I'll check in more detail at that point.

I decided to haul out the IE 8 lapper. It 'works' in IE 8 standards mode, except there is a problem with the layout, it looks horrible. There is an error in IE 7 standards and in quirks (the page's default) mode:


<script type="text/javascript" language="javascript">
marqueeInit({
uniqueid: 'mycrawler',
style: {
'width': '580px',
'height': '19px',
'background-color': '#8FB452',
'color': '2B3718',
'font-family': 'Boulevard SF',
'font-size': '12pt',
'font-weight': 'normal'
},
inc: 1, //speed - pixel increment for each iteration of this marquee's movement
});
</script>

That comma was not there in my version. It's technically invalid. Get rid of it and things should be fine in IE 8.

As for WEFT, my IE 8 gave me a warning about it, seems it might not be safe. My IE 7 just did it without telling me. Firefox ignored it, though that may be a syntax issue. From what I've read, it has to be enabled in some browsers. Boulevard SF is pretty close to sans-serif anyway. I'd use that. Less to download.

ronpaul53
12-24-2009, 06:32 PM
John, have removed 'comma' which has made no difference in IE8 in normal or compatibility mode. You state 'without a valid doctype' am a little bewildered when it has a valid doctype which validates in both 'Total Validator' and 'W3C' and as stated in original post, script rendered correctly first of all but not in Firefox or Chrome now its round the other way. as for WEFT and font embedding, I DO NOT get any warnings. You also state that my layout is so 'non-standard' in which way? am not a professional and would appreciate any comments am in XP at present as Vista & Windows 7 are both playing up at present so again am bewildered why yours is getting warnings and I am NOT. have just tried it again in both Firefox and Chrome and now it doesn't even render in them either. So what is happenning as after taking out the positioning tags it did.

jscheuer1
12-24-2009, 07:30 PM
You put back in (or never took out):


marqueeInit({
uniqueid: 'mycrawler',
style: {
'width': '580px',
'height': '19px',
'background-color': '#8FB452',
'color': '2B3718',
'top': '-109px',
'right': '2px',
'font-family': 'Boulevard SF',
'font-size': '12pt',
'font-weight': 'normal'
},
inc: 1, //speed - pixel increment for each iteration of this marquee's movement
mouse: 'pause', //mouseover behavior ('pause' 'cursor driven' or false)
moveatleast: 1,
neutral: 150,
savedirection: true
});

Never show up with that.

That's not a valid URL DOCTYPE. But I don't think it's anything we need to go into right now. The page works fine here in IE 8 in quirks. Which is what your current non-URL DOCTYPE forces. You would need a major redesign to validate to a valid URL-DOCTYPE.

jscheuer1
12-24-2009, 07:34 PM
Also, you are missing other portions of my initial cut and paste instructions. If you cannot follow what I suggest, I cannot be responsible for the outcome.

See:

http://www.dynamicdrive.com/forums/showpost.php?p=214098&postcount=4

Follow the instructions there precisely.

ronpaul53
12-24-2009, 08:03 PM
John. I did take it out but as I had made copy before doing so etc and replaced it with copy which unfortunately had the positioning tags back in again, so AGAIN my apologies taking them back out and as you say it DOES work.
Again my APOLOGIES and MANY THANKS for you time and effort

ronpaul53
12-25-2009, 05:54 PM
Although script shows in all browsers now in IE displays a 'square shape' in the centre of the banner but disappears in compatibility mode so would say NOT compatible with IE8. However I'm still bewildered why YOU say it is NOT a VALID URL-DOCTYPE WHEN IT IS AND validates which is more than I can say for the page where your script is published AND your home page comes up with 30 ERRORS and 9 WARNINGS so would suggest you get your own in order before criticising others

jscheuer1
12-25-2009, 06:22 PM
I'm not Dynamic Drive. My Page:

http://home.comcast.net/~jscheuer1/side/thecrawl/

Is valid to a HTML 4.01 Strict URL DOCTYPE. My DOCTYPE has a URL:


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">


Yours did not:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

It is the fact that your code is so quirky that it no longer works in IE 8 (probably others) now that you have an HTML 4.01 Transitional URL DOCTYPE:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

I told you not to worry about it and why (emphasis added):


That's not a valid URL DOCTYPE. But I don't think it's anything we need to go into right now. The page works fine here in IE 8 in quirks. Which is what your current non-URL DOCTYPE forces. You would need a major redesign to validate to a valid URL-DOCTYPE.

Since you seem to be making a habit of doing things I don't recommend and seem to be blaming me for the results, I'm inclined to give up trying to help you. If this is not what's happening, I'd be curious to know what you think is.

ronpaul53
12-25-2009, 07:51 PM
I only made emphasis because your posts did and I validated
http://home.comcast.net/~jscheuer1/ which didn't validate

jscheuer1
12-26-2009, 12:04 PM
There's nothing wrong with that page other than being old and (from a coding perspective) out of date. The validator assumes it's transitional, but it's not, it really cannot be validated. Anyways, I didn't ask you for help with my home page, did I? Did I mention it as an example or template for what you asked about?