Yearly Archives: 2013

WebDataMenu: Use your own hover

Infragistics WebDataMenu comes with variety of styles and lets you specify your own. At a very basic it allows you to specify styles for normal menu items and hovered menu items:

<ig:WebDataMenu ID="xwdmMyMenu" runat="server">
   <ItemSettings CssClass="MenuItem" HoverCssClass="MenuItemHover"/>
</ig:WebDataMenu>

This markup can correspond to CSS classes, for example:

.MenuItem {
   background-image:none;
   background-color:white;
}

.MenuItemHover{
   background-color:rgb(213,224,198);
}

This works fine in most cases, but since the hover/unhover is done via JavaScript sometimes there’re issues. Continue reading →

FusionCharts: Invalid Data when using javascript renderer (solved)

If you’re using FusionCharts you may encounter a strange issue – chart renders correctly when Flash renderer is in use and displays “Invalid Data” error message when falling back (or forced) to JavaScript renderer.

In most cases culprit is invalid XML data passed to the engine. And while Flash is more forgiving, JavaScript requires strict valid XML. Most often the cause for the issue are characters invalid in XML. Check your data and if they contain following characters – replace them with their encoded values:

" (quote) --> &quot;
' (apostrophe) --> &apos;
< (less sign) --> &lt;
> (greater sign) --> &gt;
& (ampersand)  --> &amp;

And the error will disappear.

Happy charting!

Infragistics WebTab: Simulating SelectedIndexChanging event when programmaticaly changing tabs via set_selectedIndex

Infragistics WebTab control is very versatile and offers rich server- and client-side model. Among client-side events are

  • SelectedIndexChanged – fires after user has changed the tab to provide ways to interact with newly selected tab
  • SelectedIndexChanging – fires before user has changed the tab to provide ways to interact with currently selected tab and to give user a chance to cancel change.

Both work fine if user manually changes tabs by clicking on tab headers, but call to client-side set_selectedIndex() function (which changes tabs programmaticaly) only fires SelectedIndexChanged, skipping SelectedIndexChanging altogether. But there’s a way to make it work.
Continue reading →

FusionCharts: Use non-numeric Xaxis in Bubble and Scatter Charts

FusionCharts states in their documentation that in Bubble and Scatter Charts both X-Axis and Y-Axis must be numeric. But what if you want X-Axis to display some names or dates or other non-numeric values? That is still possible via label attribute of chart’s categories element.

The method below utilizes ADO.NET/VB.NET to build XML for chart data, but similar approach can be easily used in other languages/technologies.

Consider the following ADO.NET DataTable, called dtChartData:

               Login Failure  Login Success
-------------- -------------- -------------
2013-03-27     1              69
2013-03-26     0              32
2013-03-25     1              86
2013-03-22     0              11

It holds data for number of successful/unsucessful logins for a given date. We want to display this data as a Bubble chart with dates displayed on X-Axis. Continue reading →

Norton 360 Provides Security, Identity Protection, PC Tune-up, and More

Are you looking to secure your computer from the infectious viruses lurking on the Internet? Are you interested in getting your PC running as fast as possible? Are you hoping to protect your identity and keep your personal information safe from intruders and scammers who will stop at anything to steal it? If so, Norton 360 has everything you are looking. Norton 360 is the all-in-one security protection software produced by Symantec that works around the clock to protect not only your computer, but you, from potential security breaches that can happen without you having the slightest idea.

Norton 360 has been updated to find and kill the most serious viruses, implementing a five layer protection system that discovers and terminates threats faster than competing software. The threat removal layer digs deep into the confines of your system to get rid of treacherous threats and viruses, while the network defense layer works to stop threats before they can even reach your system. Meanwhile, SONAR technology and constant threat monitoring keep your system in-check and monitored at all times, so that threats that have reached your computer can be detected and put to rest before the effects become noticeable and threats that exist online are weeded out from web searches and search engines, disallowing you from finding them and reaping the consequences that can occur.

While all of this is going on quietly in the background of your computer, Norton 360 is keeping your personal information guarded and your files organized, fixing any other problems that may be occurring and compressing data to keep your system running lightning fast. The security suite can be installed on up to three computers and/or devices, with cloud management controlling all devices from a single, central unit. Norton 360 users also have the option of backing up and restoring files (documents, music, videos, photos, etc.), installing parental controls, scanning and updating at all times of the day, and so much more. Norton 360 has so much to offer to all its customers. If you haven’t yet purchased a subscription, what are you waiting for?

Solution: eventArgs.get_type() incorrectly detects header of WebDataGrid in FireFox as cell

If you use CSOM of Infragistics WebDataGrid you may encounter a bug in client-side event handlers. Let’s say some action is needed on double clicking of a grid cell. The handler looks something like this:

function xMyGrid_DoubleClick(sender, eventArgs) {
   if (eventArgs.get_type() == "cell") {
      //perform action
   }
}

IF condition on line 2 makes sure that action is executed only if actual grid cell is double clicked. If you double click column header, eventArgs.get_type() would return "header" and the action would be skipped.

But not in FireFox. In that browser eventArgs.get_type() returns "cell" even when header is clicked. So an additional condition is needed. Grid column header is rendered as a TH HTML element and this is what we can check:

function xMyGrid_DoubleClick(sender, eventArgs) {
   if (eventArgs.get_type() == "cell" &&  eventArgs.get_item().get_element().tagName != 'TH') {
      //perform action
   }
}

This solution works universally in all browsers.

ABCMouse.com contact number is 800-633-3331

ABCMouse.com offers teaching games for kids. Some like them, some don’t – it’s a matter of taste and preference. What really sucks about the site is their contacts – they never respond to emails, and online contact form isn’t of much use either. And nowhere on the site they list phone number for a contact.

Fortunately such number does exist:

1-800-633-3331

And when you call it, surprisingly, you get to speak to a live person, who resolves your problems pretty quickly.


DISCLAIMER

I feel really silly posting this disclaimer, but due to numerous comments here it is: I am in no way associated with ABCMouse.com. I myself had a bad experience with their service and when I found their direct phone number I decided to share it with the others to spare them the frustration I went through. So, again, I am not charging your card, I cannot cancel your account, please CONTACT THE COMPANY VIA NUMBER ABOVE!


UPDATE

Since visitors here continue to complain and ask advice, I decided to open a message board (forum) where users can exchange experiences and ask for advice.

  1. Please register first: http://forum.galanter.net/ucp.php?mode=register
  2. And login to post question/answers here: http://forum.galanter.net/viewforum.php?f=4

Never mind.

Implement “onVisible” event for HTML DOM element in JavaScript

Well, not exactly, but method described in this particular scenario can be expanded to other cases. Imagine you have a clickable element, let’s say a SPAN and when user clicks this element – it is covered by an absolutely positioned DIV with a higher z-index. In other words a dialog is displayed:

<span onclick="showDialogDiv()">Click here</span>

When user closes the dialog – your SPAN needs to detect this event, to perform some functions (refresh data on the page etc.) but you have no control over function that closes the DIV, so you can’t hook into it. All you know is that DIV’s display style is set to “none” when this happens. It would be cool if there was an “onvisible” event so you could do something like

<span onclick="showDialogDiv()" onvisible="performAction()">Click here</span>

but there’s no such event, so we need to simulate it. Which is surprisingly easy:

<span onclick="showDialogDiv(); var i=setInterval(function(){if ($('xdivDialog').style.display=="none") {clearInterval(i);performAction()}},1000)">Click here</span>

Basically when user clicks the SPAN to show the dialog – at the same time a timer is started that regularly checks visibility of the dialog DIV (whether it’s style display became “none” again). Once this is detected, that means opener SPAN is visible again – timer is stopped and function to handle event is called.