co.ador Posted December 23, 2009 Author Share Posted December 23, 2009 I have backtrace like: <?php Database::ExecuteQuery(debug_backtrace("INSERT INTO `rating` (`item_name`, `rating`, `ip_address`, //line 91 `date_rated`) VALUES ('{$varItem}', {$varRating}, '{$ipAddress}', NOW())", "InsertRating")); ?> Then it will produce a parse error on line 65 it is expecting a T_function. <b>Parse error</b>: parse error, expecting `T_FUNCTION' in <b>C:\wamp\www\nyhungry\classes\rating.class.php</b> on line <b>65</b><br /> <?php if (!get_magic_quotes_gpc()) // line 65 { $varItem = addslashes($varItem); } ?> 65 is the line where it checks if there is magic quotes and that's part of the problem where it won't rate items with apostrophe, I believe that the back_trace() function has signal to the problem.. Quote Link to comment Share on other sites More sharing options...
co.ador Posted December 23, 2009 Author Share Posted December 23, 2009 it seems like a semicolon might be missing if (!get_magic_quotes_gpc()); it was not the semicolon Quote Link to comment Share on other sites More sharing options...
Buddski Posted December 23, 2009 Share Posted December 23, 2009 No its not missing.. I think I used the wrong term.. When I said backtrace.. I was referring to you actually walking(not literally:)) yourself through the code, each step of the way to find out exactly why the insert query isnt being run, ie. Do any other if statement impact its running, do you have to check a checkbox.. that sort of thing... Quote Link to comment Share on other sites More sharing options...
co.ador Posted December 23, 2009 Author Share Posted December 23, 2009 you mean debuging, i understand the term but not sure about doing the actual action of debuging. Do any other if statement impact its running, do you have to check a checkbox.. that sort of thing... Is the above quote a statement a question? Quote Link to comment Share on other sites More sharing options...
Buddski Posted December 23, 2009 Share Posted December 23, 2009 They are questions you have to ask yourself.. Start at the start and work your way through the code to see why its not running the insert query.. this is something only you can do cause its your code and you should know how it works.... Ill give you 1 little change and tell me what it says.. in your rating script thing, inside the RateItem function // Check to see that the user has not already rated this item echo 'Checking IP Address Now'; if (Rating::CheckRatingsByIp($varItem) == 0) And then run the code.. if it doesnt say 'Checking IP Address Now' it means its not even getting upto that part of the script.. you can put little echoes all throughout your RateItem function to see if its being called and where its getting too and find out why its not finishing how you expect.. Quote Link to comment Share on other sites More sharing options...
co.ador Posted December 23, 2009 Author Share Posted December 23, 2009 echo 'Checking IP Address Now'; won't echo anywhere inside the RateItem method, not even in the else statement which means the $varItem variable value is not passing inside the RateItem right? Is that a method of debugging? echo'Checking Ip Address Now'; it will echo in others methods.. but not in the RateItem Method below.. <?php public static function RateItem($varItem, $varRating, $varClasses) { $newClassNames = $varClasses; // Verify $varName was provided if ($varItem != null && strlen(trim($varItem)) != 0 && $varRating != null && strlen(trim($varRating)) != 0 && is_numeric($varRating) && $varClasses != null && strlen(trim($varClasses)) != 0) { // Check if Magic Quotes is ON if (!get_magic_quotes_gpc()) { $varItem = addslashes($varItem); } // Check to see that the user has not already rated this item if (Rating::CheckRatingsByIp($varItem) == 0) { $ipAddress = $_SERVER['REMOTE_ADDR']; Database::ExecuteQuery("INSERT INTO `rating` (`item_name`, `rating`, `ip_address`, `date_rated`) VALUES ('{$varItem}', {$varRating}, '{$ipAddress}', NOW())", "InsertRating"); Database::FetchResults("InsertRating"); Database::FreeResults("InsertRating"); Database::RemoveSavedResults("InsertRating"); // Information for the Output $averageStars = Rating::CalculateAverageRating($varItem); $newClassNames = "rated " . Rating::ShowStars($averageStars); } } else { // This is a major issue. NOT enough information was sent to log the item Error::LogError("Variable(s) Missing", "You must provide all of the information to log the rating of this item."); } ?> it will be actually a lot of fund debugging thanks you for explaining me how to debug Quote Link to comment Share on other sites More sharing options...
Buddski Posted December 23, 2009 Share Posted December 23, 2009 So now you know that the RateItem function isnt being called.. You just need to hunt around your code and look for what, if anything, calls it or if you yourself has to initiate it.. Quote Link to comment Share on other sites More sharing options...
co.ador Posted December 23, 2009 Author Share Posted December 23, 2009 I have created this little test to see if varItem has a value <?php if($varItem){ echo "yea"; } else {echo "colo";} ?> <?php public static function RateItem($varItem, $varRating, $varClasses) { if($varItem){ echo "yea"; } else {echo "colo";} $newClassNames = $varClasses; // Verify $varName was provided if ($varItem != null && strlen(trim($varItem)) != 0 && $varRating != null && strlen(trim($varRating)) != 0 && is_numeric($varRating) && $varClasses != null && strlen(trim($varClasses)) != 0) { ?> I have put the test code at the beggining of the RateItem as above but it don't even echo "colo" which is the else statement it throws an parse error as: <b>Parse error</b>: parse error, expecting `T_FUNCTION' in <b>C:\wamp\www\nyhungry\classes\rating.class.php</b> on line <b>78</b><br /> Quote Link to comment Share on other sites More sharing options...
Buddski Posted December 23, 2009 Share Posted December 23, 2009 We have already ascertained that the RateItem function isnt being called... I was looking at your code again and saw that you have <a href="javascript:RateItem(...)"> things. What does the RateItem javascript function do? Quote Link to comment Share on other sites More sharing options...
co.ador Posted December 23, 2009 Author Share Posted December 23, 2009 that will refresh from rating an item and have it rated without having to refresh the whole page just the rating stars. the fuction looks like function RateItem(varItemId, varRating) { var varOrigClassName = document.getElementById(varItemId).className; // Retrieve Ajax Feeds new Ajax.Request('ajax.rate.item.php', { method: 'post', parameters: {item: varItemId, rating: varRating, classes: varOrigClassName}, onSuccess: ReloadRating, onFailure: RatingError } ); } I was debugging the method public static function OutputRating($varItem) making sure the $varItem variable goes through the method. I have tested with the little test script i have below <?php if($varItem){ echo "yea"; } else {echo "colo";} ?> for the most part it will echo yea until it gets to the <?php return $output; ?> <?php public static function OutputRating($varItem) { // Verify $varItem was provided if ($varItem != null && strlen(trim($varItem)) != 0) { // Check if Magic QUotes is ON if (!get_magic_quotes_gpc()) { $varItem = addslashes($varItem); } // Information for the Output $averageStars = Rating::CalculateAverageRating($varItem); // Check to see that the user has not already rated this item if (Rating::CheckRatingsByIp($varItem) == 0) { $classes = "rating " . Rating::ShowStars($averageStars); // Write Output HTML for the Rating Data $output = "\r\n"; $output .= "<ul class=\"{$classes}\" id=\"{$varItem}\">\r\n"; $output .= " <li class=\"one\"><a href=\"javascript:RateItem('{$varItem}', 1);\" title=\"1 Star\">1</a></li>\r\n"; $output .= " <li class=\"two\"><a href=\"javascript:RateItem('{$varItem}', 2);\" title=\"2 Stars\">2</a></li>\r\n"; $output .= " <li class=\"three\"><a href=\"javascript:RateItem('{$varItem}', 3);\" title=\"3 Stars\">3</a></li>\r\n"; $output .= " <li class=\"four\"><a href=\"javascript:RateItem('{$varItem}', 4);\" title=\"4 Stars\">4</a></li>\r\n"; $output .= " <li class=\"five\"><a href=\"javascript:RateItem('{$varItem}', 5);\" title=\"5 Stars\">5</a></li>\r\n"; $output .= "</ul>\r\n"; } else { $classes = "rated " . Rating::ShowStars($averageStars); // Write Output HTML for the Rating Data $output = "\r\n"; $output .= "<ul class=\"{$classes}\" id=\"{$varItem}\">\r\n"; $output .= " <li class=\"one\">1</li>\r\n"; $output .= " <li class=\"two\">2</li>\r\n"; $output .= " <li class=\"three\">3</li>\r\n"; $output .= " <li class=\"four\">4</li>\r\n"; $output .= " <li class=\"five\">5</li>\r\n"; $output .= "</ul>\r\n"; } } else { $output = ""; // This is a major issue. NO information can be retrieve if an item name is not passed. Error::LogError("Variable Missing", "You must provide the item name for this function to find the average."); } return $output; if($varItem){ echo "yea"; } else {echo "colo";} } ?> at the end of the OutputRating method see the test script it won't display yea neither colo.. mmmm. is it supposed to display "yea" or "colo" if I put the test script in there below the return OutputRating; Quote Link to comment Share on other sites More sharing options...
Buddski Posted December 24, 2009 Share Posted December 24, 2009 It wont work there because once you have used 'return' the rest of the code is ignored because the function is complete.. Quote Link to comment Share on other sites More sharing options...
co.ador Posted December 24, 2009 Author Share Posted December 24, 2009 ok that normal then, The $varItem variable and the others used by the RateItem, comes from this file. ajax.rate.item.php <?php <?php header('Content-type: text/html; charset=utf-8');?> <?php require_once("classes/include.all.php"); // Check that the data was sent if (sizeof($_POST) == 0 || $_POST['item'] == null || strlen(trim($_POST['item'])) == 0 || $_POST['rating'] == null || strlen(trim($_POST['rating'])) == 0 || $_POST['classes'] == null || strlen(trim($_POST['classes'])) == 0) { die("You shouldn't be attempting to access this file in this manner."); } echo Rating::RateItem($_POST['item'], $_POST['rating'], $_POST['classes']); ?> ?> can you see the RateItem being instantiated at the bottom of the script above? those POST variables extract those indexes from the javascript:RateItem method you were askin before. which lead me to think that at the the strings with apostrophe or any other especial characters before javascript:RateItem function at the html frame are not being escaped, that's why the data is not ratin the string with especial characters. the RateItem javascript metho looks like and it request the ajax.rate.item.php file as in // Retrieve Ajax Feeds new Ajax.Request('ajax.rate.item.php', rating.js where Javascript:RateItem method reside. if(window!=top)top.location=location.href; function RateItem(varItemId, varRating) { var varOrigClassName = document.getElementById(varItemId).className; // Retrieve Ajax Feeds new Ajax.Request('ajax.rate.item.php', { method: 'post', parameters: {item: varItemId, rating: varRating, classes: varOrigClassName}, onSuccess: ReloadRating, onFailure: RatingError } ); } function ReadNameValuePairs(nameValuePair) { var trimspaces = /(\s)+/; var returnData = new Array(); var pairs = nameValuePair.split('&'); for (var i = 0; i < pairs.length; i++) { var pair = pairs[i].split('='); returnData[pair[0].replace(trimspaces, "")] = pair[1]; } return returnData; } function ReloadRating(requestObj, jsonObj) { var newlines = /(\r\n|\r|\n)/; var returnData = ReadNameValuePairs(requestObj.responseText.replace(newlines, "")); document.getElementById(returnData['item']).className = returnData['classes']; var liObj = document.getElementById(returnData['item']).getElementsByTagName('a'); for (var i = 0; i < liObj.length; i++) { liObj[i].onclick = function(){}; } } function RatingError() { } The sequence goes as in rating.class.php user rate $output .= "<ul class=\"{$classes}\" id=\"{$varItem}\">\r\n"; $output .= " <li class=\"one\"><a href=\"javascript:RateItem('{$varItem}', 1);\" title=\"1 Star\">1</a></li>\r\n"; javascript:RateItem is called in rating.js new Ajax.Request('ajax.rate.item.php', { method: 'post', parameters: {item: varItemId, rating: varRating, classes: varOrigClassName}, onSuccess: ReloadRating, onFailure: RatingError } ); } then the index item, rating, classes are extracted at ? <?php echo Rating::RateItem($_POST['item'], $_POST['rating'], $_POST['classes']); ?> then what? i was thinking if the index item at rating.js where RateItem method reside, some how should be escaped so that it can be able to rate strings with especial characters? Right now I don't have any knowledge of javascript. Quote Link to comment Share on other sites More sharing options...
Buddski Posted December 24, 2009 Share Posted December 24, 2009 You need to find out what the result is from the Ajax Request.. basically what is being returned to JavaScript from the ajax.rate.item.php Changing these 2 functions will help with that.. rating.js function ReloadRating(requestObj, jsonObj) { alert(requestObj.responseText); var newlines = /(\r\n|\r|\n)/; var returnData = ReadNameValuePairs(requestObj.responseText.replace(newlines, "")); document.getElementById(returnData['item']).className = returnData['classes']; var liObj = document.getElementById(returnData['item']).getElementsByTagName('a'); for (var i = 0; i < liObj.length; i++) { liObj[i].onclick = function(){}; } } function RatingError(requestObj, jsonObj) { alert(requestObj.responseText); } Quote Link to comment Share on other sites More sharing options...
co.ador Posted December 24, 2009 Author Share Posted December 24, 2009 Buddski The sequence goes from rating.js to ajax.rate.item.php, or the other way around, ajax.rate.item.php to rating.js What understood from your last post is information goes from rating.js to ajax.rate.item.php. I have put the two lines you have added to the two functions at the rating.js but they have return any errors or anything like that?after adding those two lines was I supposed to rate the item and expect for some kind of error in case there were some? how can I test what is being return to javascript from ajax.rate.item.php Sorry I am newbie for javascript. thank you. below is the js with the modifications you have posted in your last post. if(window!=top)top.location=location.href; function RateItem(varItemId, varRating) { var varOrigClassName = document.getElementById(varItemId).className; // Retrieve Ajax Feeds new Ajax.Request('ajax.rate.item.php', { method: 'post', parameters: {item: varItemId, rating: varRating, classes: varOrigClassName}, onSuccess: ReloadRating, onFailure: RatingError } ); } function ReadNameValuePairs(nameValuePair) { var trimspaces = /(\s)+/; var returnData = new Array(); var pairs = nameValuePair.split('&'); for (var i = 0; i < pairs.length; i++) { var pair = pairs[i].split('='); returnData[pair[0].replace(trimspaces, "")] = pair[1]; } return returnData; } function ReloadRating(requestObj, jsonObj) { alert(requestObj.responseText); var newlines = /(\r\n|\r|\n)/; var returnData = ReadNameValuePairs(requestObj.responseText.replace(newlines, "")); document.getElementById(returnData['item']).className = returnData['classes']; var liObj = document.getElementById(returnData['item']).getElementsByTagName('a'); for (var i = 0; i < liObj.length; i++) { liObj[i].onclick = function(){}; } } function RatingError(requestObj, jsonObj) { alert(requestObj.responseText); } Quote Link to comment Share on other sites More sharing options...
Buddski Posted December 24, 2009 Share Posted December 24, 2009 Those changes I gave you should allow alert the result after your rate an item.. Basically what will happen is this.. 1. You click to rate something. 2. Javascript calls an Ajax function to ajax.rate.item.php 3. The Ajax will return an output and run either a success function or error function 4. With those changes you should get an alert box showing you that result. Quote Link to comment Share on other sites More sharing options...
co.ador Posted December 24, 2009 Author Share Posted December 24, 2009 This is the little box that is coming up now... SELECT COUNT(*) AS `totalRatings` FROM `rating` WHERE `item_name`='Nike Zoom Kobe Huarache' AND `ip_address`='127.0.0.1'AlreadyRatedINSERT INTO `rating` (`item_name`, `rating`, `ip_address`, `date_rated`) VALUES ('Nike Zoom Kobe Huarache', 5, '127.0.0.1', NOW())InsertRatingSELECT AVG(`rating`) AS `averageRating` FROM `rating` WHERE `item_name`='Nike Zoom Kobe Huarache'AverageRatingclasses=rated fivestar&item=Nike Zoom Kobe Huarache That's the three queries coming up after rating an item. Those are the three queries coming out of Rating.class.php <?php <?php class Rating { ## PRIVATE VARIABLES ## END PRIVATE VARIABLES ## PUBLIC METHODS // Output the Rating information // Returns a string of HTML public static function OutputRating($varItem) { // Verify $varItem was provided if ($varItem != null && strlen(trim($varItem)) != 0) { // Check if Magic QUotes is ON if (function_exists('get_magic_quotes_gpc')) { $varItem = stripslashes($varItem); } $varItem = mysql_real_escape_string($varItem); var_dump($varItem); // Information for the Output $averageStars = Rating::CalculateAverageRating($varItem); // Check to see that the user has not already rated this item if (Rating::CheckRatingsByIp($varItem) == 0) { $classes = "rating " . Rating::ShowStars($averageStars); // Write Output HTML for the Rating Data $output = "\r\n"; $output .= "<ul class=\"{$classes}\" id=\"{$varItem}\">\r\n"; $output .= " <li class=\"one\"><a href=\"javascript:RateItem('{$varItem}', 1);\" title=\"1 Star\">1</a></li>\r\n"; $output .= " <li class=\"two\"><a href=\"javascript:RateItem('{$varItem}', 2);\" title=\"2 Stars\">2</a></li>\r\n"; $output .= " <li class=\"three\"><a href=\"javascript:RateItem('{$varItem}', 3);\" title=\"3 Stars\">3</a></li>\r\n"; $output .= " <li class=\"four\"><a href=\"javascript:RateItem('{$varItem}', 4);\" title=\"4 Stars\">4</a></li>\r\n"; $output .= " <li class=\"five\"><a href=\"javascript:RateItem('{$varItem}', 5);\" title=\"5 Stars\">5</a></li>\r\n"; $output .= "</ul>\r\n"; } else { $classes = "rated " . Rating::ShowStars($averageStars); // Write Output HTML for the Rating Data $output = "\r\n"; $output .= "<ul class=\"{$classes}\" id=\"{$varItem}\">\r\n"; $output .= " <li class=\"one\">1</li>\r\n"; $output .= " <li class=\"two\">2</li>\r\n"; $output .= " <li class=\"three\">3</li>\r\n"; $output .= " <li class=\"four\">4</li>\r\n"; $output .= " <li class=\"five\">5</li>\r\n"; $output .= "</ul>\r\n"; } } else { $output = ""; // This is a major issue. NO information can be retrieve if an item name is not passed. Error::LogError("Variable Missing", "You must provide the item name for this function to find the average."); } return $output; } // Rate an Item // Returns the name/value pair of new class names and the item name public static function RateItem($varItem, $varRating, $varClasses) { $newClassNames = $varClasses; // Verify $varName was provided if ($varItem != null && strlen(trim($varItem)) != 0 && $varRating != null && strlen(trim($varRating)) != 0 && is_numeric($varRating) && $varClasses != null && strlen(trim($varClasses)) != 0) { // Check if Magic Quotes is ON if (!get_magic_quotes_gpc()) { $varItem = addslashes($varItem); } // Check to see that the user has not already rated this item if (Rating::CheckRatingsByIp($varItem) == 0) { $ipAddress = $_SERVER['REMOTE_ADDR']; Database::ExecuteQuery("INSERT INTO `rating` (`item_name`, `rating`, `ip_address`, `date_rated`) VALUES ('{$varItem}', {$varRating}, '{$ipAddress}', NOW())", "InsertRating"); Database::FetchResults("InsertRating"); Database::FreeResults("InsertRating"); Database::RemoveSavedResults("InsertRating"); // Information for the Output $averageStars = Rating::CalculateAverageRating($varItem); $newClassNames = "rated " . Rating::ShowStars($averageStars); } } else { // This is a major issue. NOT enough information was sent to log the item Error::LogError("Variable(s) Missing", "You must provide all of the information to log the rating of this item."); } // Build Name/Value Pair to return $nameValue = "classes={$newClassNames}&item={$varItem}"; return $nameValue; } ## END PUBLIC METHODS ## PRIVATE METHODS // Calculate Average Rating // Returns the number of stars to show private static function CalculateAverageRating($varItem) { $averageStars = 0; // Query Average Rating for a specific Item Database::ExecuteQuery("SELECT AVG(`rating`) AS `averageRating` FROM `rating` WHERE `item_name`='{$varItem}'", "AverageRating"); $results = Database::FetchResults("AverageRating"); Database::FreeResults("AverageRating"); Database::RemoveSavedResults("AverageRating"); // Round the Average into a Whole Number if (sizeof($results) == 1) { if ($results[0]['averageRating'] != null) { $averageStars = round($results[0]["averageRating"], 0); } } else { // This is simply a warning, as it isn't vital if no results were found, as the item may be new. Error::LogWarning("Rating Data Missing", "No entries were found for '{$varName}', this might be the first entry."); } return $averageStars; } // Show Stars // Returns the class information for the number of stars to show private static function ShowStars($varStars) { $aStars = array( 1 => 'onestar', 2 => 'twostar', 3 => 'threestar', 4 => 'fourstar', 5 => 'fivestar' ); return (true === array_key_exists((integer)$varStars, $aStars)) ? $aStars[(integer)$varStars] : 'nostar' ; } // Check Ratings By IP Address // Returns the number of ratings for an item by an ip address private static function CheckRatingsByIp($varItem) { $ipAddress = $_SERVER['REMOTE_ADDR']; Database::ExecuteQuery("SELECT COUNT(*) AS `totalRatings` FROM `rating` WHERE `item_name`='{$varItem}' AND `ip_address`='{$ipAddress}'", "AlreadyRated"); $results = Database::FetchResults("AlreadyRated"); Database::FreeResults("AlreadyRated"); Database::RemoveSavedResults("AlreadyRated"); // Check to see that the user has not already rated this item if ($results != null && $results[0]['totalRatings'] != null) { return $results[0]['totalRatings']; } return 0; } ## END PRIVATE METHODS } ?> ?> So rate an item and there is a pup up windows that shows the returning data to rating.js from ajax.rate.item.php. But strangely enough there is not pup up box with the returning data when rating an item with a special string character in its string. there is not returning data to rating.js from ajax.rate.item.php when apostrophes in the string. Quote Link to comment Share on other sites More sharing options...
Buddski Posted December 24, 2009 Share Posted December 24, 2009 You need to take out the echoes in your Execute query script and change: function RatingError(requestObj, jsonObj) { alert(requestObj.responseText); } to function RatingError(requestObj, jsonObj) { alert('Error: '+requestObj.responseText); } then give it a shot. Quote Link to comment Share on other sites More sharing options...
co.ador Posted December 24, 2009 Author Share Posted December 24, 2009 you mean the ExecuteQuery at rating.class.php or at the rating.js? Quote Link to comment Share on other sites More sharing options...
co.ador Posted December 24, 2009 Author Share Posted December 24, 2009 echos at the ExecuteQuery at the database.php ok i know where Quote Link to comment Share on other sites More sharing options...
co.ador Posted December 24, 2009 Author Share Posted December 24, 2009 i took out the echoes at the ExecuteQuery here: <?php public static function ExecuteQuery($sql,$name) { if (self::$connection) { if (strlen(trim($name)) != 0) { switch (self::$type) { case "mysql": if (!array_key_exists($name, self::$savedQueries)) { self::$savedQueries[$name] = @mysql_query($sql, self::$connection) or Error::LogError("Query Failed", mysql_error(self::$connection)); } ?> then put the modification at the rating.js function RatingError(requestObj, jsonObj) { alert('Error: '+requestObj.responseText); } Still won't rate the apostrophe string :'( Quote Link to comment Share on other sites More sharing options...
Buddski Posted December 24, 2009 Share Posted December 24, 2009 Do you get any alerts when trying to rate that item? Or if your using IE does the bottom left hand corner of the window have an ! in a yellow triangle? Quote Link to comment Share on other sites More sharing options...
co.ador Posted December 25, 2009 Author Share Posted December 25, 2009 Yeaa \ Mr internet explorer shows a message that says: This error display when open index3.php a script error occrued on this page. You can send a page screenshot with script error description and useful other informations by clicking the "Email" button. You can view this dialog again by clicking the script error Notification button on the Debug Toolbar Email an IE screenshot window with script error description Line: 15 Character: 1 Code: 0 Error Message: Syntax error URL: http://localhost/nyhungry/index3.php The error below occurs when a user try to rate an item IE display the box below similar to the one above but with a differnt line number and differnt error message: Object required a script error occrued on this page. You can send a page screenshot with script error description and useful other informations by clicking the "Email" button. You can view this dialog again by clicking the script error Notification button on the Debug Toolbar Email an IE screenshot window with script error description Line: 5 Character: 3 Code: 0 Error Message: Object required URL: http://localhost/nyhungry/index3.php Quote Link to comment Share on other sites More sharing options...
co.ador Posted December 25, 2009 Author Share Posted December 25, 2009 Buddski when i rate it, then open the firebug and see in the script tab it display and that's the point where the error starts, by the way I am inserting it through the item name. 1javascript:RateItem('Giovannis\'s%20Restaurants',%205); Quote Link to comment Share on other sites More sharing options...
Buddski Posted December 26, 2009 Share Posted December 26, 2009 Try changing this so it looks like javascript:RateItem("Giovannis's Restaurants",5); Quote Link to comment Share on other sites More sharing options...
co.ador Posted December 26, 2009 Author Share Posted December 26, 2009 Buddski what I did was to insert it by the id, Would be good to insert it by the name of the item but the string won't let it do it. I tried changing the doubles quotes but it will create a display issue. by now i will leave it inserting by the id, even though it will be a lot harder to recognize which item it is. Well right now it's working. Thank Buddski for going through this problem. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.