iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hello,
I am studying your Car Rental Management sample for WebScheduler at http://live.intersoftpt.com/cs/WebScheduler/CarRental.aspx?noframe=1&path=/WebScheduler/New%20Features%20in%20V3/New%20Reference%20Samples
If you happen to delete a row in the sql database Resources table, for example row No. 3 (Nissan Versa), a javascript error will be thrown when you click on the small info button for Honda Fitz (row No. 4), because the script (DetailClick) is looking for the deleted row 3 but cannot find it. Furthermore, after this gap in the rows, the detailed information displayed when you click the small info button will be thrown out of sequence for all cars.
Can you modify the portion of the javascript involved (shown below), so that there is no error when there are gaps caused by missing rows in the database, and so that the car info is kept in sequence after any gap in the rows.
Regards
Jean
function WebScheduler1_OnInitialize(controlId) {
{
temp.innerHTML = str;
div.appendChild(temp.children[0]);
}
function DetailClick() {
desc.innerHTML = resource.Description.replace(/, /gi, "<br /><br />");}}
Hello Jean,
Sure, please use the following codes below.
function WebScheduler1_OnInitialize(controlId) { var s = ISGetObject(controlId); var table = s.GetResourcesTable(); var rows = table.rows; for (var i = 1; i < rows.length; i++) { var cell = rows[i].cells[1]; var div = cell.children[0].children[0]; var resources = s.Resources; var resourceIndex = i - 1; if (resourceIndex < resources.length) { var str = "<img id='detail" + resources[resourceIndex].ResourceID + "' src='./images/detail.gif' type='detail' style='margin-left: 5px; cursor: pointer;' title='Click here to show detail'>" var temp = document.createElement("DIV"); temp.innerHTML = str; div.appendChild(temp.children[0]); } } Listener.Add(table, "onclick", DetailClick); }
Regards,Handy
I am unable to replicate the issue that your reported (error script and gap). Can you please confirm this issue by sending your recording video about step by step to replicate the issue? Also, What is the current browser that you use?If it is possible, please try to install our WebUIStudio 2010R2 release. It contains our latest hotfixes.
Hello Handy,
Please run the attached sample to see the error (you will need to add the bin and images folders). I simply deleted row No. 3 from the Resources Table in the Car Rental database to produce this error.
If you click on the small info button for car No. 3 (as shown by red arrow in attached screenshot), you will get the error, because this car (which is now positioned 3rd under Cars in the scheduler) corresponds to row No. 4 in the database but the script is looking for row No. 3, which no longer exist in the database.
Furthermore, after car No. 3, the detailed information (which appears in the rightmost bottom pane) is wrong for every car.
So for a scenario where it might be necessary to delete some records from the database, without reseeding the identity column, how do you prevent this error?
Regards,
Thank you for your guidance. Our development teams will fix this issue. This issue is caused by incorrect validation. The id is generated with looping by getting the row element. To avoid this error, you will need to get the resource collection.Fyi, it will need more time to upload the fix the our live sample. However, thank you for your report.
Handy,
Thank you for your reply.
If it is going to take time in order to upload the fix on your live sample site, then I would appreciate you posting the fix here or sending it to me by email as soon as it is available.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname