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

IMPORTANT: This forum is provided as the community board for users to help each other. Softcomplex makes no warranties regarding the timing and/or accuracy of the responses you'll receive (if any). Please visit the support section for alternative support options. The postings that don't comply with the board rules will be removed without notice.
Post Reply
Who Can Post? All users can post new topics and all users can reply.
Username   Need to register?
Password:   Forgot password?
Subject: (optional)
Message:
HTML is Off
Smilies are Off
BB Code is On
[img] Code is On

Disable Smilies?
Use signature?
Turn BBCode off?
Receive email on reply?
Attachment:
    

Topic Review
nutsnbolts

 posted on 4/8/2008 at 05:33 AM
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
nutsnbolts

 posted on 4/8/2008 at 02:42 AM
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

Go To Top


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