C
CalgaryWebGuy
Please help,
My class assignment is due today and I am all finished except for one
small portion.
The instructor wants us to import a script from somewhere else, and for
some reason I deceided to make it more complicated than it needs to be.
What I am trying to do is create a popup when the user leaves the page
( I know pop-ups are bad, but they are a part of the course) that
displays the imported script. It works perfectly in firefox, but IE
displays everything except the script.
I am a total loss at why, hopefully someone can shed some light on this
for me:
(the closeWin() is called from the body tag using
onUnload="closeWin()")
// Import a script from somewhere else.
function closeWin() {
closeWindow = window.open("","closeWin",
"toolbar=no,resizable=no,width=500,height=225,scrollbar=no,left=250,top=200")
closeWindow.document.write("<html><head><title>An Imported
Script<\/title><\/head><body><table align='center'><tr><td colspan='2'
align='center'><p>The following is an imported script<\/p><script
src='external.js' language='JavaScript'
type='text/javascript'>importedScript()<\/script><p
align='center'><font face='arial' size='-2'>This free script provided
by<\/font><br><font face='arial, helvetica' size='-2'><a
href='http://javascriptkit.com'>JavaScript
Kit</a><\/font><\/p><\/td><\/tr><\/table><\/body><\/html>")
}
function importedScript() {
//Roller Coaster Script - By JavaScriptKit Over 200+ free scripts
here!
var fs=1
var direction="right"
function rollertext(whichone){
var thetext=whichone
for (i=0;i<thetext.length;i++){
document.write(thetext.charAt(i).fontsize(fs))
if (fs<7&&direction=="right")
fs++
else if (fs==7){
direction="left"
fs--
}
else if (fs==1){
direction="right"
fs++
}
else if (fs>1&&direction=="left")
fs--
}
}
//Change below text to your won
rollertext("Life is like a roller coaster ride. Hang on tight!")
}
My class assignment is due today and I am all finished except for one
small portion.
The instructor wants us to import a script from somewhere else, and for
some reason I deceided to make it more complicated than it needs to be.
What I am trying to do is create a popup when the user leaves the page
( I know pop-ups are bad, but they are a part of the course) that
displays the imported script. It works perfectly in firefox, but IE
displays everything except the script.
I am a total loss at why, hopefully someone can shed some light on this
for me:
(the closeWin() is called from the body tag using
onUnload="closeWin()")
// Import a script from somewhere else.
function closeWin() {
closeWindow = window.open("","closeWin",
"toolbar=no,resizable=no,width=500,height=225,scrollbar=no,left=250,top=200")
closeWindow.document.write("<html><head><title>An Imported
Script<\/title><\/head><body><table align='center'><tr><td colspan='2'
align='center'><p>The following is an imported script<\/p><script
src='external.js' language='JavaScript'
type='text/javascript'>importedScript()<\/script><p
align='center'><font face='arial' size='-2'>This free script provided
by<\/font><br><font face='arial, helvetica' size='-2'><a
href='http://javascriptkit.com'>JavaScript
Kit</a><\/font><\/p><\/td><\/tr><\/table><\/body><\/html>")
}
function importedScript() {
//Roller Coaster Script - By JavaScriptKit Over 200+ free scripts
here!
var fs=1
var direction="right"
function rollertext(whichone){
var thetext=whichone
for (i=0;i<thetext.length;i++){
document.write(thetext.charAt(i).fontsize(fs))
if (fs<7&&direction=="right")
fs++
else if (fs==7){
direction="left"
fs--
}
else if (fs==1){
direction="right"
fs++
}
else if (fs>1&&direction=="left")
fs--
}
}
//Change below text to your won
rollertext("Life is like a roller coaster ride. Hang on tight!")
}