473,408 Members | 2,009 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Script "kills" the rest of page in IE, not in Firefox

I'm currently working on a revised home page for my church.

The script loads a date listing into an iframe (in a table cell) at
the right side of the page and then scrolls the list to today's date.
The script works okay on all version of Firefox and IE for Macintosh.

On IE for Windows, the script seems to runs okay, but none of the
content below the script appears on the page. Below is the script.

THe page address is http://www.pontonline.org/index-new3.htm

Thanks, in advance, for any suggestions on this.

Excelsior! -Cloy
<script language="JavaScript">
<!--
var date = new Date();
var d = date.getDate();
var day = (d < 10) ? '0' + d : d;
var m = date.getMonth() + 1;
var month = (m < 10) ? '0' + m : m;
var year = date.getFullYear();
document.write('<iframe name="News" width="280" marginwidth="0"
height="280" frameborder="0" marginheight="0" align="left"
scrolling="auto" hspace="0" vspace="0" src="office/calendar-
items.htm#' + month + day + year + '"');
document.write('Your browser does not support inline frames or is
currently configured not to display inline frames.')
document.write('</iframe>')
// -->
</script>

Feb 5 '07 #1
3 1642
On Feb 4, 7:32 pm, "Cloy" <c...@tobola.comwrote:
I'm currently working on a revised home page for my church.

The script loads a date listing into an iframe (in a table cell) at
the right side of the page and then scrolls the list to today's date.
The script works okay on all version of Firefox and IE for Macintosh.

On IE for Windows, the script seems to runs okay, but none of the
content below the script appears on the page. Below is the script.

THe page address ishttp://www.pontonline.org/index-new3.htm

Thanks, in advance, for any suggestions on this.

Excelsior! -Cloy

<script language="JavaScript">
<!--
var date = new Date();
var d = date.getDate();
var day = (d < 10) ? '0' + d : d;
var m = date.getMonth() + 1;
var month = (m < 10) ? '0' + m : m;
var year = date.getFullYear();
document.write('<iframe name="News" width="280" marginwidth="0"
height="280" frameborder="0" marginheight="0" align="left"
scrolling="auto" hspace="0" vspace="0" src="office/calendar-
items.htm#' + month + day + year + '"');
document.write('Your browser does not support inline frames or is
currently configured not to display inline frames.')
document.write('</iframe>')
// -->
</script>
I see where the <iframe is started but where does the actual iframe
tag end eg:
<iframe name= src="blah" but no ending '>'

I checked your link to see if this might have been a mistake in
pasting... it doesn't appear so.

It's always the small stuff.

- Craig Taylor
www.ctalkobt.net

Feb 5 '07 #2
On Feb 5, 10:32 am, "Cloy" <c...@tobola.comwrote:
I'm currently working on a revised home page for my church.

The script loads a date listing into an iframe (in a table cell) at
the right side of the page and then scrolls the list to today's date.
The script works okay on all version of Firefox and IE for Macintosh.

On IE for Windows, the script seems to runs okay, but none of the
content below the script appears on the page. Below is the script.

THe page address ishttp://www.pontonline.org/index-new3.htm

Thanks, in advance, for any suggestions on this.

Excelsior! -Cloy

<script language="JavaScript">
The language attribute is deprecated, type is required. Replace with:

<script type="text/javascript">

<!--
There is no need for HTML comment delimiters, just remove them.

var date = new Date();
var d = date.getDate();
var day = (d < 10) ? '0' + d : d;
var m = date.getMonth() + 1;
var month = (m < 10) ? '0' + m : m;
var year = date.getFullYear();
document.write('<iframe name="News" width="280" marginwidth="0"
height="280" frameborder="0" marginheight="0" align="left"
scrolling="auto" hspace="0" vspace="0" src="office/calendar-
items.htm#' + month + day + year + '"');
Craig may be onto something - the opening iFrame tag seems to be
missing he closing ">", see below.

document.write('Your browser does not support inline frames or is
currently configured not to display inline frames.')
document.write('</iframe>')
// -->
Remove this comment delimiter too.
</script>
It is best to write the entire iframe in one string rather than three
separate strings - browsers are more likely to correctly handle
complete elements than ones added bit by bit.

e.g.:

var HTMLstring = '<iframe name="News" width="280" marginwidth="0"' +
' height="280" frameborder="0" marginheight="0" align="left"' +
' scrolling="auto" hspace="0" vspace="0"' +
' src="office/calendar-items.htm#' + month + day + year + '">' +
'Your browser does not support inline frames or is' +
' currently configured not to display inline frames.</iframe>';
document.write(HTMLstring);
--
Rob
Feb 5 '07 #3
Thanks for the help, gentlemen!

The missing fixed the error and I modified the script tag as Rob
suggested.

One other quick question if you have time....

The script I use to scroll the iframe content to the proper place also
makes the page "jump" down after it loads.

Any suggestions on a workaround for this? Is there a command I could
use to onLoad(scroll-to-top) or something like that?

Excelsior! -Cloy
Feb 5 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Kornelius Finkenbein | last post by:
Hello folks! I've got a strange problem with my download-script in conjunction with M$ internet explorer, if the filename I want to link to includes more than one points. In Netscape the problem...
2
by: Jeff Thies | last post by:
I have a script with a regex var re = /\/(\w+?)\//; In IE5 Mac, that kills all javascript, anywhere on the page. No errors but no functionality at all. Just the mere presence of that line...
0
by: Marc Scheuner [MVP ADSI] | last post by:
Folks, I'm trying to get a grip on customizing my WebBrowser control hosted on a WinForms form. I've come as far as finding out about IDocHostUIHandler, and I've implemented the...
5
by: jensen bredal | last post by:
I need to keep track on user "session data" while still turning session off as i do not want users login to expire? Thanks JB
1
by: Shadow Lynx | last post by:
Consider this simple HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 STRICT//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head>...
3
by: Tobius | last post by:
I want to be able to define a custom onerror event that detects an attempt to call a known function and load a file if it's not already loaded and re-call the function. The only problem is that any...
15
by: Lennart | last post by:
Hi folks, I have created an animated image gallery in dhtml. It works fine in Internet Explorer. In Firefox, it only works if I ommit the DOCTYPE tag. The page is valid xhtml-strict but with a...
10
by: Breana | last post by:
Ok i found this a while back and i am trying to mod it so it works but it keeps not updating the users online and kills my other code? Well i got it working but it dont update when i login?...
11
by: rfr | last post by:
When I add a transitional doctype to the weather page on my community website, I loose certain Js scripts, but not all of them. This puzzles me. The main menu is powered by a js script and...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.