google maps markers z-index

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..

Check valid email address using Javascript

Posted on October 23rd, 2008 in programming, web | 7 Comments »

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.

{

//........

}

JQuery around the globe

Posted on June 9th, 2008 in programming, tech, web | Comments Off

Recent John Resig’s speaches :

  1. jQuery (BarCamp Boston)
  2. Processing and Processing.js (BarCamp Boston)
  3. jQuery (MeshU)
  4. Managing the Mozilla Way (Slashdot, ITWorld)
  5. jQuery (DrupalCamp Toronto)
  6. JavaScript 1.5 to 2.0
  7. JavaScript Libraries (Kings of Code)
  8. JavaScript Libraries (@Media)
  9. jQuery (BostonPHP)

demo used:

via John Resig

Jquery – first contact

Posted on June 3rd, 2008 in programming, web | 1 Comment »

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