Posted on July 13th, 2010 in javascript, web | Comments Off
The z-index of the Google Maps markers is set on their creation so they always come out on top of each other – first one under the second, second under the third and so on. So if you like to highlight a particular marker indifferent of the creation order you need to create a function that will set the z- index of that specific marker to the highest of all markers so that it will come on top.
A marker’s z- index can be obtained by calling this function: GOverlay.getZIndex(marker.getPoint().lat())
This function expects 2 parameters: the first one is the marker and the second apears to be always “undefined”;
Attach your function to the marker by using the GMarkerOption {zIndexProcess:myFunction} – this function only gets evaluated when the marker is addOverlay()ed.
see a working example here..
Using this regular expression filter does the trick:
var filterEmail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z])+\.)+([a-zA-Z]{2,4})+$/;
if (filterEmail.test(Email)) //Check the Email Format.
{
//........
}
Posted on June 9th, 2008 in programming, tech, web | Comments Off
Drag&drop Tabs
Requests:
A dynamic user interface using the jQuery javascript library that allows an user to drag and drop a tab from one tab component to another.
Resources and online documentation used:
Time Management :
The order of events over the past days :
- Friday, May 30: 3 hours of reading/resource searching on JQuery.
- Saturday, May 31: 3-4 hours of tutorials and examples, experiencing with the JQuery UI.
- Sunday, June 1: 2 hours – putting together the interface.
The Interface :
The JQuery UI components used are:
The order of events managed:
- Create the two tab sets using JQuery’s tabs component.
- Make the tabs draggable with JQuery’s draggable component.
- Make the heads of the tab sets a “droppable” area so that it can recieve a new dragged element.
- On the “drop” event : Get the corespondent content of a dragged tab, remove drgged tab from the source tab set, add new tab into the destination tab set with a coresponding content identical to the one it came from
I used the “flora” theme found in the resources available in the JQuery documentation.
View the interface!
Main issues:
-didn’t figure out why the movement from the right set to the left one doesn’t work propperly
-didn’t manage to make the 2 containing divs display “on the same line” in IE6.. tried with a wrapper div but still not working