Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel textbox to HTML

Status
Not open for further replies.

TommyF

Technical User
Oct 28, 2001
104
I don't know if what I am trying to do is possiable. I have an excel document that I save as a webpage. I have also added some extra HTML code in using the script editor. This extra code will run a message across the top of the webpage as information of job changes, at the moment the only way to change the text is to edit it with the script editor.

Is it poss to have a text box in excel that I can fill the message text in and it will insert it into my script using VB or is there another way..

The script code is as follows.


<script language=&quot;JavaScript1.2&quot;>

/*
Cross browser Marquee script- ) Dynamic Drive (For full source code, 100's more DHTML scripts, and Terms Of Use, visit Credit MUST stay intact
*/

//Specify the marquee's width (in pixels)
var marqueewidth=715
//Specify the marquee's height
var marqueeheight=30
//Specify the marquee's marquee speed (larger is faster 1-10)
var marqueespeed=1
//configure background color:
var marqueebgcolor=&quot;#DEFDD9&quot;
//Pause marquee onMousever (0=no. 1=yes)?
var pauseit=1

//Specify the marquee's content (don't delete <nobr> tag)
//Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):

var marqueecontent='<nobr><font face=&quot;Arial&quot;><font size = 5>Ben can you turn the monitor of on this PC for me please. Thanks Thomas</font></nobr>'


////NO NEED TO EDIT BELOW THIS LINE////////////
marqueespeed=(document.all)? marqueespeed : Math.max(1, marqueespeed-1) //slow speed down by 1 for NS
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var iedom=document.all||document.getElementById
if (iedom)
document.write('<span id=&quot;temp&quot; style=&quot;visibility:hidden;position:absolute;top:-100;left:-5000&quot;>'+marqueecontent+'</span>')
var actualwidth=''
var cross_marquee, ns_marquee

function populate(){
if (iedom){
cross_marquee=document.getElementById? document.getElementById(&quot;iemarquee&quot;) : document.all.iemarquee
cross_marquee.style.left=marqueewidth+8
cross_marquee.innerHTML=marqueecontent
actualwidth=document.all? cross_marquee.offsetWidth : document.getElementById(&quot;temp&quot;).offsetWidth
}
else if (document.layers){
ns_marquee=document.ns_marquee.document.ns_marquee2
ns_marquee.left=marqueewidth+8
ns_marquee.document.write(marqueecontent)
ns_marquee.document.close()
actualwidth=ns_marquee.document.width
}
lefttime=setInterval(&quot;scrollmarquee()&quot;,20)
}
window.onload=populate

function scrollmarquee(){
if (iedom){
if (parseInt(cross_marquee.style.left)>(actualwidth*(-1)+8))
cross_marquee.style.left=parseInt(cross_marquee.style.left)-copyspeed
else
cross_marquee.style.left=marqueewidth+8

}
else if (document.layers){
if (ns_marquee.left>(actualwidth*(-1)+8))
ns_marquee.left-=copyspeed
else
ns_marquee.left=marqueewidth+8
}
}

if (iedom||document.layers){
with (document){
document.write('<table border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;><td>')
if (iedom){
write('<div style=&quot;position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden&quot;>')
write('<div style=&quot;position:absolute;width:'+marqueewidth+';height:'+marqueeheight+';background-color:'+marqueebgcolor+'&quot; onMouseover=&quot;copyspeed=pausespeed&quot; onMouseout=&quot;copyspeed=marqueespeed&quot;>')
write('<div id=&quot;iemarquee&quot; style=&quot;position:absolute;left:0;top:0&quot;></div>')
write('</div></div>')
}
else if (document.layers){
write('<ilayer width='+marqueewidth+' height='+marqueeheight+' name=&quot;ns_marquee&quot; bgColor='+marqueebgcolor+'>')
write('<layer name=&quot;ns_marquee2&quot; left=0 top=0 onMouseover=&quot;copyspeed=pausespeed&quot; onMouseout=&quot;copyspeed=marqueespeed&quot;></layer>')
write('</ilayer>')
}
document.write('</td></table>')
}
}
</script>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top