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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple banner script from different frame? 1

Status
Not open for further replies.

lwicks

MIS
Jan 15, 1999
7
GB
Q: Is anyone able to help me I am trying to run a simple scrolling banner in a footer frame on a webpage. I'd like the banner to change based on the main frame. <br>
So... can I get the javascript to change the variable etc. and change the text in the banner or do I write a Javasccript that will load both the new main frame and the new footer frame when they click on a link.<br>
<br>
Anyone able to make a suggestion?
 
Sure, can you give me your URL for the main frames page (I can get the info I need to write the script for you from there)?<br>
I'm pretty sure I can help you on this one.<br>
<br>
Either/Or is possible, do you want the banner info to be page specific? or do you want it to be random? Page specific I can do.
 
Lance-<br>
<br>
This is something that you CAN do. I'll try to get you a quick JS app that will perform this function for you later this week, depending on my business schedule.<br>
<br>
<br>
-Robherc
 
Any chance to look at this yet?<br>
(sorry to be pushy)<br>
<br>
Lance
 
Oh MAN!!! sorry about that...I forget what appened, but I seem to have forgotten to answer posts on about 4 different forums; to tell you the truth, I think I looked at your page a while ago; but I forget what the app. for your banner was...<br>
were you just wanting to change the text?
 
Yup,<br>
<br>
Just looking to have a text banner in the footer frame and change the text based on the main frame.<br>
<br>
Lance
 
For the easiest possible setup, try this:<br>
<br>
Insert the following JavaScript code into the JavaScript for the banner frame<br>
<br>
var msg1="Message for the marquee from one window";<br>
var msg2="Message from another window";<br>
var msg3="Message from ANOTHER window";<br>
.<br>
.<br>
.<br>
var currMsg<br>
function showmarquee(msg)<br>
{<br>
//Insert all of the necessary scripting to run the marquee <br>
//using eval(eval("msg"+msg)) to select the message text;<br>
//for the marquee to display;<br>
}<br>
&lt;/script&gt;<br>
&lt;body onLoad="showmarquee(1);"&gt;<br>
<br>
and in the windows that you want to have a different marque for insert the following in their &lt;body&gt; tag:<br>
<br>
onLoad="window.parent.(name of the frame containgint the marquee script).showmarquee(2); //or (3) or (4), the # for the msg you want to display;" <br>
<br>
<br>
I hope this will work for you (I regret that I don't have the necessary time to help you urther; but I can try to help you if this doesn't work)<br>
<br>
<br>
-Robherc<br>
robherc@netzero.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top