To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > Misc Help > ClientSide Technologies

ClientSide Technologies Discuss HTML/CSS/Javascript, and any other client-side technologies, here.

Reply
 
Thread Tools Rate Thread Display Modes
Old 03-18-2006, 10:30 PM   #1
NZ_Kiwis
Senior Member
 
Join Date: Apr 2005
Posts: 699
[RESOLVED] Problem with my JavaScript

This does not work for me????

PHP Code:
<?php
$t
= 0;

$result2 = mysql_query ("SELECT * From results_data order by updatetime desc  limit 5");
while(
$row2 = mysql_fetch_array($result2)) {
$team1id = $row2[team1_id];
$team2id = $row2[team2_id];
$result3 = mysql_query ("SELECT * From results_team where team_id = $team1id");
$row3 = mysql_fetch_array($result3);
$result4 = mysql_query ("SELECT * From results_team where team_id = $team2id");
$row4 = mysql_fetch_array($result4);
?>
var singletext=new Array();
singletext[<?php echo $t; ?>]='<div align="center"><font size="1" fave="verdana" color="black"><br><?php echo $row3[team_sh_name];
?> <?php echo $row4[team_sh_name]; ?><br></div>';
<?php
$t
++;
}
?>


out put on screen

var singletext=new Array();
singletext[0]='<div align="center"><font size="1" fave="verdana" color="black"><br>Tigers Kia Ora<br></div>';
var singletext=new Array();
singletext[1]='<div align="center"><font size="1" fave="verdana" color="black"><br>Marist Levin<br></div>';
var singletext=new Array();
singletext[2]='<div align="center"><font size="1" fave="verdana" color="black"><br>Hawera Linton<br></div>';
var singletext=new Array();
singletext[3]='<div align="center"><font size="1" fave="verdana" color="black"><br>Auck Sea Lions Canterbury<br></div>';
var singletext=new Array();
singletext[4]='<div align="center"><font size="1" fave="verdana" color="black"><br>Wellington Northern<br></div>';
Thut this which is the example that came with the script does...


PHP Code:
singletext[0]='<div align="center" class=tabb>'+
'<a target="_self" class=tabb href="http://vbarsan.com/">'+
'Vertical News Scroller v7.0'+
'<br>Horizontal News Scroller v7.0'+
'<br>Typewriter News Scroller v5.0</a></div>';
singletext[1]='<div align="center" class=tann>Multiple Message Scroller V3.0.</div><div align="center" class=tan>Once a message left, next one comes in.<br>Adjustable: Size, Speed and Background.<br>Any message may use <u>Hyperlinks</u></div>';
singletext[2]='<div class=tann>Cross-Browser:</div><div class=tan><b>Windows/Linux:</b> ie4+ firefox1+ ns6+ opera7+ ns4+.<br><b>MAC OS X:</b> safari ie5+ firefox1+ opera7+.</div>';
singletext[3]='<div align="center" class=tan>Any message may be <b><i>as large as desired.</i></B><br><br>===<br><br>...<br><br>===<br><br>...<br><br>===<br><br>One may use <b><i>all the basic HTML code.</i></B></div>';
The error i get is "undefined"
does anyone know why?
NZ_Kiwis is offline   Reply With Quote
Old 03-18-2006, 10:31 PM   #2
NZ_Kiwis
Senior Member
 
Join Date: Apr 2005
Posts: 699
worked it out, never mind
NZ_Kiwis is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 05:57 PM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.