Categories | Question details Back To List | ||
function called within function issue during addRow I'm SO close to an answer I can taste it.... I need to have a popup delay for a moment. Using the javascript "setTimeout" function works. For example: <a href="#" onmouseover="setTimeout('showRestaurantPopup();',1000)">Show Popup</a> --------------------------------------------------------------------------------------------------------------- During an addRow I have the following that works fine: sURL = "<a href='#' style='color:#58585a;font-family:Arial;font-weight:normal;font-size:10pt;text-decoration:none;' onclick='selectRestaurant();' onmouseover='showRestaurantPopup("+iRow+");'>"+sRestaurant+"</a>" grdSearchResults.addRow(iRow,[sURL]+','+sLeadTime+','+mMinimum+','+sEstimatedPrice+','+mDeliveryCharge); --------------------------------------------------------------------------------------------------------------- However when I attempt to combine the two I get some of the data moved into the next column because of the comma. I even tried to move the function into a seperate variable to see if that helped (it didn't) sFunction = "showRestaurantPopup("+iRow+");" sURL = "<a href='#' style='color:#58585a;font-family:Arial;font-weight:normal;font-size:10pt;text-decoration:none;' onclick='selectRestaurant();' onmouseover=setTimeout("+sFunction+"',1000)>"+sRestaurant+"</a>" grdSearchResults.addRow(iRow,[sURL]+','+sLeadTime+','+mMinimum+','+sEstimatedPrice+','+mDeliveryCharge); Any thoughts? James Answer posted on Apr 17, 2009 01:50 Change the syntax of addRow command as grdSearchResults.addRow(iRow,[sURL,sLeadTime,mMinimum,sEstimatedPrice,mDeliveryCharge]); so all column values provided as single array of data, in such case grid will not use comma as data separator, and any values can be used inside the cell. |