473,785 Members | 2,801 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="JavaS cript">
<!--
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.getFullYea r();
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 1658
On Feb 4, 7:32 pm, "Cloy" <c...@tobola.co mwrote:
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="JavaS cript">
<!--
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.getFullYea r();
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.co mwrote:
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="JavaS cript">
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.getFullYea r();
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
4014
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 doesn't exist. For example: input: ... download.php?name=virtualdub_1.4.9.zip
2
1091
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 without it being called. removing the "?", returns everything normal.
0
2334
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 "ShowContextMenu" method of that interface to provide my own context menu: #region IDocHostUIHandler Members
5
1874
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
1937
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> <title>Strict kills my widths!</title> </head> <body> <table style="width:400px; table-layout:fixed;">
3
2242
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 triggering of the onerror event stops execution of the script block in question. Is there a workaround for this? Here's an example of what I'm trying to accomplish: ==================================================
15
5407
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 xhtml1-strict DOCTYPE, I get a dead script and dozens of error messages like "Error in parsing value in property 'width'. Declaration dropped." on Line 0. This page doesn't work in Firefox but is valid xhtml:...
10
2307
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? It says 14 guest now, and i am logged in so it sould ream me as member..... And how do i make a cron job, the tutorial says it lowrs site badwith and it runs better updating records?
11
2733
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 seems to function even with eh doctype. But, the floating menu doesn't function once I put a transitional doctype of the page. The js script that handles the floating top of page icon on the
0
9481
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10095
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9953
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8978
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7502
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6741
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4054
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3655
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.