Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Dynamic Data Solution with IE problem
nutsnbolts
Junior Member

Posts: 3
Registered: 3/26/2008
Member Is Offline
posted on 4/8/2008 at 02:42 AM Reply With Quote
Dynamic Data Solution with IE problem


Had a friend help me with this dynamic data solution but I have not been able to get a hold of him to deal with this question.
Modified scroll.html as recommended and modified scroll.tpl0.php as follows.
Code:

<?PHP

$host = 'mydbhost';
$user = 'iusername';
$pass = 'pswd';
$name = 'dbname';

$cnn = mysql_connect($host, $user, $pass) or die ('Error connecting to mysql');
mysql_select_db($name);

$query = "SELECT * FROM ts WHERE status='active' ORDER BY id_num ASC LIMIT 8";
$result = mysql_query($query) or die('Error');
$num_rows = mysql_num_rows($result);

?>

var LOOK = {
// scroller box size: [width, height]
'size': [120, 110]
},

BEHAVE = {
// autoscroll - true, on-demand - false
'auto': true,
// vertical - true, horizontal - false
'vertical': true,
// scrolling speed, pixels per 40 milliseconds;
// for auto mode use negative value to reverse scrolling direction
'speed': 2
},

ITEMS = [
<?php
while($row = mysql_fetch_object ( $result ) ){
if($i == $num_rows){
echo "{'file': '','content': '$row->content','pause_b': 2,'pause_a': 0}";
}else{
echo "{'file': '','content': '$row->content','pause_b': 2,'pause_a': 0},";
$i++;
}
}
mysql_free_result($result);
mysql_close();
?>]


Function of script is (supposed) to grab content from table "ts"
Table has 8 rows with fields for id content and status.
if status =active content is shown otherwise it is supposed to just loop through the fields shown as active.

Works fine in FF but no show in IE Suspect script is inserting comma before closing bracket but don't know enough php to know how to check that or change it. If anyone could help I would be most appreciative

TIA
View User's Profile View All Posts By User U2U Member
nutsnbolts
Junior Member

Posts: 3
Registered: 3/26/2008
Member Is Offline
posted on 4/8/2008 at 05:33 AM Reply With Quote
Update


Ok, the problem is the comma before the closing bracket in ITEMS eg:
Code:

var LOOK = { // scroller box size: [width, height] 'size': [120, 110] },

BEHAVE = { // autoscroll - true, on-demand - false 'auto': true, // vertical - true, horizontal - false 'vertical': true, // scrolling speed, pixels per 40 milliseconds; // for auto mode use negative value to reverse scrolling direction 'speed': 2 },

ITEMS = [ {'file': '','content': 'Thank you for stopping by..... Check back soon','pause_b': 2,'pause_a': 0},{'file': '','content': 'We Are Under Construction Your Mileage May Vary','pause_b': 2,'pause_a': 0},{'file': '','content': 'Downtown Savannah Store Now Open
14 West State Street','pause_b': 2,'pause_a': 0},{'file': '','content': 'Tips and tricks from our professionals','pause_b': 2,'pause_a': 0},{'file': '','content': 'Members only area with chat and forums','pause_b': 2,'pause_a': 0},{'file': '','content': 'Live WebCam from our new downtown location','pause_b': 2,'pause_a': 0},]


Any suggestions?

TIA
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos:
Multiple vertical scrolling
Horizontal scrolling
Free Download Free Download
Product Documentation Documentation:
Documenation Page
Change Log
Support Forum Technical Support
Support Forum
   

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004