[jQuery] Re: confirm does not work
Hi again,
Nevermind that, it works afterall. My bandwidth and FF were the actual
problem in picking up the modifications i was making to the code.
Cheers, God bless jquery ;p
On Nov 17, 12:52 pm, Adonis <achrysoch...@hotmail.com> wrote:
> Hi,
>
> My confirm pop up window does not pop up using the code bellow,
> *
> function initialiseLegendLayerDeletion(project_name, layer_name,
> unslug_project_name, unslug_layer_name){
> // This function deletes the corresponding layer - ajax deletion
> $("#" + layer_name + "_legend_layer_header_delete_layer").click
> (function(){
> if(confirm("Are you sure you want to delete "+unslug_layer_name
> +"?")){
> $.ajax({
> type: 'POST',
> url: '/deleteLegendLayer/',
> data: { layer_name: unslug_layer_name, project_name:
> unslug_project_name },
> success: function(data){
> $("#" + project_name + "_" + layer_name +
> "_layer_in_legend").remove();
> $("#" + project_name + "_" + layer_name +
> "_legend_accodion_layer_entry").remove();
>
> // remove all spatial features under this layer from the
> associative arrays and the google map
> // remove areas from map
> createPolygon(project_name, "0", unslug_layer_name,
> unslug_project_name);
> // remove area from array
> delete polygon_assoc_array[unslug_project_name]
> [unslug_layer_name];
>
> }
> });
> }
> });} // end of function initialiseLegendLayerDeletion()
>
> *
>
> I have tried bind, click, live, $post, $ajax but none of them gives me
> a confirmation window when i click on the deletion button..
>
> Any suggestions? Thanks in advance!
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home