codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  ticker script  Archive Import (Sinai) at 07:53 on Sunday, September 29, 2002
 

The code following this message is the perfect solution for a page I am building. However it needs one minor modification to it for it to work as I need it to. Where "var msgs = new Array" is listed the message programmed into the script with "Welcome to Qiksearch", and e.t.c. I need the code modified so a script can feed the subject automatically. So instead of "Welcome to Qiksearch", the topic would have this code to feed it,
<script rc="http://headlines.agapepress.org/headlines/headline1.js"></script>

Can someone possibly fix the code for me so it will work with the feed script?

Thanks,
Anthony Hamil


<script language="javascript">

//News Bar script- By Premshree Pillai (premshree@hotmail.com)
//http://www.qiksearch.com/javascripts.htm

//------------------------------CONFIGURE NEWS BAR--------------------------------

//Copy entire script and <style> section in the head of page
//************* SEE END OF SCRIPT FOR OPTION TO TICK MESSAGES *******************

var msgs = new Array(
"Welcome to Qiksearch",
"FREE Javascripts from Qiksearch",
"Intellisearch Bar 2.0",
"DynamicDrive.com" ); // No comma after last ticker msg

var msg_url = new Array(
"http://www.qiksearch.com",
"http://www.qiksearch.com/javascripts.htm",
"http://www.qiksearch.com/intellisearch.htm",
"http://www.dynamicdrive.com" ); // No comma after last ticker url

// For New Window, "1"
var target_url = new Array(
"0",
"0",
"0",
"1" );

var barwidth=350 //Enter main bar width in px or %
var setdelay=2000 //Enter delay between msgs, in mili-seconds
var mouseover_color='#B5D0FF' //Specify highlight color
var mouseout_color='#FFFFFF' //Specify default color

//---------------------------------------------------------------------------------

/////////////////////////////////////////////////////////////////////

var count=0;
var ns6=document.getElementById&&!document.all
var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1

if (ie4||ns6){
document.write('<form name="news_bar"><input type="button" value="3" onclick="moveit(0)" class="scrollerstyle" style="width:22; height:22; border-right-width:0px;" name="prev" title="Previous News"><input type="button" name="news_bar_but" onclick="goURL();" style="color:#000000;background:' + mouseout_color + '; width:'+barwidth+'; height:22; border-width:1; border-color:#000000; cursor:hand" onmouseover="this.style.background=mouseover_color" onmouseout="this.style.background=mouseout_color"><input type="button" value="4" onclick="moveit(1)" class="scrollerstyle" style="width:22; height:22; border-left-width:0px;" name="next" title="Next News"></form>');
}
else{
document.write('<form name="news_bar"><input type="button" value="Previous" onclick="moveit(0)">')
if (navigator.userAgent.indexOf("Opera")!=-1)
document.write('<input type="button" name="news_bar_but" onclick="goURL();" style="width:'+barwidth+'" border="0">')
else
document.write('<input type="button" name="news_bar_but" onclick="goURL();" width="'+barwidth+'" border="0">')
document.write('<input type="button" value="Next" onclick="moveit(1)"></form>')
}

function init_news_bar(){
document.news_bar.news_bar_but.value=msgs[count];
}
//moveit function by Dynamicdrive.com
function moveit(how){
if (how==1){ //cycle foward
if (count<msgs.length-1)
count++
else
count=0
}
else{ //cycle backward
if (count==0)
count=msgs.length-1
else
count--
}
document.news_bar.news_bar_but.value=msgs[count];
}

function tick_bar(){
setInterval("moveit(1)",setdelay)
}

function goURL(){
if(target_url[count]=="0")
{
location.href=msg_url[count];
}
else
{
window.open(msg_url[count]);
}
}

//--------------------------------------Ticker Effect----------------------------------

tick_bar(); // delete this line if you don't want messages to tick

//-------------------------------------------------------------------------------------

init_news_bar();

</script>





  Re: ticker script  Archive Import (sinai) at 06:41 on Tuesday, October 01, 2002
 

I think one reason you don't have too many people coming here is they get tired of closing your popup window advertisements








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: calling C# from javascript
•  Re: Header Frame ?
•  Adhyayan - Annual Student Conference and Online Coding Festival
•  Re: Gidview row disable
•  Re: Knowing how to get TaylorMade R11 Irons
•  Re: refresh parent after closing pop up window
•  TaylorMade RocketBallz RBZ Driver will travel long and low
•  Supposedly the TaylorMade R11 Irons are supposed
•  TaylorMade R11s Fairway Wood


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2012