[jQuery] Re: confirm does not work

2009-11-17 Thread Adonis
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  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!


[jQuery] confirm does not work

2009-11-17 Thread Adonis
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!


[jQuery] Re: input file type get name

2009-11-02 Thread Adonis
ok, problem was the resetForm:true.
Setting it to false fixes the empty values...for now.
cheers,

On Nov 2, 6:46 pm, Adonis  wrote:
> well,
> I ll be more specific, here is the code part
>
> **
> $("#image_overlay_group_form").ajaxForm({
>                 success: function(msg) {
>                 var downLat = $("#image_overlay_sw_lat").val();
>                 var downLon = $("#image_overlay_sw_lng").val();
>                 var upLat = $("#image_overlay_ne_lat").val();
>                 var upLon = $("#image_overlay_ne_lng").val();
>                 var fileName = $("#image_overlay_file").val();
>                 alert("rs image filename: " + fileName + " , " + upLon
> + ", "+ downLat); // --> this has empty values!!
>
>                 $("#" + project_name + "_" + layer_name +"_"+
> group_name+ "_new_legend_feature_entry_point").after(msg);
>
>                 },
>             resetForm: true // Reset the form after a successful AJAX
> call
>             });
> **
>
> my guess is that the form inputs are emptied somehow and thus no
> values are available...but in some other ajaxForms i have, i use the
> same technique and it works..
> I ll keep trying but any suggestions are much appreciated!
>
> On Oct 30, 7:29 pm, James  wrote:
>
> > The .val() should work. I've tried it and it works on FF3.5, IE6+,
> > Safari and Chrome (all WinXP).
> > The only differences I found is that FF, Safari, Chrome returns just
> > the filename, whereas IE6+7 returns the full path of the user file
> > (privacy issue), and IE8 uses 'C:\fakepath' as the directory
> > (misleading..).
>
> > On Oct 30, 8:29 am, Adonis  wrote:
>
> > > hi,
>
> > > I was wondering if anyone knows a way togetthe file name(the one the
> > > user has just browsed and is about to upload using the form) from a
> > > forminput.
> > > I tried $("#fileInput").val() but it does not work.
>
> > > cheers,


[jQuery] Re: input file type get name

2009-11-02 Thread Adonis
well,
I ll be more specific, here is the code part

**
$("#image_overlay_group_form").ajaxForm({
success: function(msg) {
var downLat = $("#image_overlay_sw_lat").val();
var downLon = $("#image_overlay_sw_lng").val();
var upLat = $("#image_overlay_ne_lat").val();
var upLon = $("#image_overlay_ne_lng").val();
var fileName = $("#image_overlay_file").val();
alert("rs image filename: " + fileName + " , " + upLon
+ ", "+ downLat); // --> this has empty values!!

$("#" + project_name + "_" + layer_name +"_"+
group_name+ "_new_legend_feature_entry_point").after(msg);

},
resetForm: true // Reset the form after a successful AJAX
call
});
**

my guess is that the form inputs are emptied somehow and thus no
values are available...but in some other ajaxForms i have, i use the
same technique and it works..
I ll keep trying but any suggestions are much appreciated!

On Oct 30, 7:29 pm, James  wrote:
> The .val() should work. I've tried it and it works on FF3.5, IE6+,
> Safari and Chrome (all WinXP).
> The only differences I found is that FF, Safari, Chrome returns just
> the filename, whereas IE6+7 returns the full path of the user file
> (privacy issue), and IE8 uses 'C:\fakepath' as the directory
> (misleading..).
>
> On Oct 30, 8:29 am, Adonis  wrote:
>
> > hi,
>
> > I was wondering if anyone knows a way togetthe file name(the one the
> > user has just browsed and is about to upload using the form) from a
> > forminput.
> > I tried $("#fileInput").val() but it does not work.
>
> > cheers,


[jQuery] input file type get name

2009-10-30 Thread Adonis
hi,

I was wondering if anyone knows a way to get the file name(the one the
user has just browsed and is about to upload using the form) from a
form input.
I tried $("#fileInput").val() but it does not work.

cheers,


[jQuery] Re: $.post() speed

2009-10-12 Thread Adonis

Yeap, thanks fof the helping out!!
I still may have some more questions and if so, i ll post some more!
Kind regards,

On Oct 9, 5:43 pm, MorningZ  wrote:
> You've got the "x" set inside the callback and are trying to alert it
> *before* it gets back from it the $.postcall, hence it's empty
>
> so if you have
>
> $.post( ... do ajax stuff to variable "x" . )
> alert(x);  // <---  this gets run right away, the asynchronous call of
> $.post doesn't "wait to finish" before going to the next line
>
> so another way of looking at it:
>
> var foo = "1";
> $.post(  some ajax call that takes 2 seconds to set foo to "99"  );
> alert(foo);
>
> that is going to alert "1" each and every time, because JavaScript
> isn't going to "wait" before doing the alert
>
> does that help?
>
> On Oct 9, 12:18 pm, Adonis  wrote:
>
>
>
> > ok, here is an effort to sum up the code..
>
> > *
> > function initialiseLegendLayerGroupEntry(a,b,c,d,e,f) {
> > var x;
> >     $("#division_name").bind("click", function() {
> >         if(this.value == "sth") {
> >             y=callFunction(a,b,c,d,e,f);
> >             $.ajax({
> >                 type: "POST",
> >                 url: "/serverFunction/",
> >                 data: {project_name:d,layer_name:e,group_name:f},
> >                 success: function(msg){
> >                     $("#an entry point for html files that are
> > served").after(msg);
> >                     alert( $("#division where the wanted value is
> > stored").val() );  // this alert window pops up at the end.
> >                     x= $("#division where the wanted value is
> > stored").val();
> >                      }
> >             });
> >     alert(x); // this pop up window is always empty. it opens while i
> > still receive "print" commands from my server script !
> >         }
> >     });
>
> > }
>
> > I think this code is a good example of my problem. Can you identify an
> > error somewhere?
>
> > thanks,
>
> > On Oct 8, 6:07 pm, MorningZ  wrote:
>
> > > You should should the specific $.post() code in detail, there's
> > > something you are missing because when you get back from the async
> > > call, everything (global variables, page objects) are fully available
> > > at that point... there's zero need to use setTimeout
>
> > > On Oct 8, 12:27 pm, Adonis  wrote:
>
> > > > Dan,
>
> > > > I used a $.ajax() call with a callback -> success: function(msg) etc.
> > > > but still it does not work the way I want to.
> > > > from the server side i am using,
>
> > > > *
> > > > return render_to_response("blah.html",{ 'project_id':project_id },
> > > > context_instance = RequestContext(request))
> > > > *
> > > > putting the project_id in a 
> > > > >
>
> > > > and if the ajax call is successfull i do this,
>
> > > > *
> > > > alert( $(#klain).val() );
> > > > *
>
> > > > The alert window does pop up, but after the rest of the functions in
> > > > the code have been read. I somehow need to delay the javascript
> > > > parsing, until the input of the division in the html that is rendered
> > > > gets the "project_id" value. This is why i am looking into setTimeOut
> > > > () js function.
>
> > > > cheers,
>
> > > > On Oct 8, 2:08 pm, "Dan G. Switzer, II" 
> > > > wrote:
>
> > > > > Adonis,
> > > > > The $.post() function is asynchronous (by default) when your code 
> > > > > hits a
> > > > > $.post() call, it'll keep executing code. In order to do something 
> > > > > with the
> > > > > results of your AJAX call, you'll want to use the callback 
> > > > > option--which is
> > > > > a function run when the AJAX call is completed.
>
> > > > > -Dan
>
> > > > > On Thu, Oct 8, 2009 at 7:14 AM, Adonis  
> > > > > wrote:
>
> > > > > > I am not entirely sure if i am using proper definitions here, but 
> > > > > > here
> > > > > > it goes..
>
> > > > > > I have $.post() inside javascript functions. If ajax is successfull,
> > > > > > it returns data from the server. I am trying to assign this data  to
> > > > > > javascript global variables. The problem is that my global 
> > > > > > javascript
> > > > > > variables end up to be empty. It seems it takes time for the ajax to
> > > > > > return the data and by the time the server data is returned, the
> > > > > > browser has comploted reading through the rest of the javascript
> > > > > > functions. Thus, leaving my global variables empty.
>
> > > > > > Do you have any suggestions on how this could be fixed? I am trying
> > > > > > setTimeOut() at the moment but i would be glad to concider other
> > > > > > solutions as well..
>
> > > > > > I could provide code examples on request.
>
> > > > > > Thanks in advance!- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: $.post() speed

2009-10-09 Thread Adonis

ok, here is an effort to sum up the code..

*
function initialiseLegendLayerGroupEntry(a,b,c,d,e,f) {
var x;
$("#division_name").bind("click", function() {
if(this.value == "sth") {
y=callFunction(a,b,c,d,e,f);
$.ajax({
type: "POST",
url: "/serverFunction/",
data: {project_name:d,layer_name:e,group_name:f},
success: function(msg){
$("#an entry point for html files that are
served").after(msg);
alert( $("#division where the wanted value is
stored").val() );  // this alert window pops up at the end.
x= $("#division where the wanted value is
stored").val();
 }
});
alert(x); // this pop up window is always empty. it opens while i
still receive "print" commands from my server script !
}
});
}

I think this code is a good example of my problem. Can you identify an
error somewhere?

thanks,

On Oct 8, 6:07 pm, MorningZ  wrote:
> You should should the specific $.post() code in detail, there's
> something you are missing because when you get back from the async
> call, everything (global variables, page objects) are fully available
> at that point... there's zero need to use setTimeout
>
> On Oct 8, 12:27 pm, Adonis  wrote:
>
> > Dan,
>
> > I used a $.ajax() call with a callback -> success: function(msg) etc.
> > but still it does not work the way I want to.
> > from the server side i am using,
>
> > *
> > return render_to_response("blah.html",{ 'project_id':project_id },
> > context_instance = RequestContext(request))
> > *
> > putting the project_id in a 
> > >
>
> > and if the ajax call is successfull i do this,
>
> > *
> > alert( $(#klain).val() );
> > *
>
> > The alert window does pop up, but after the rest of the functions in
> > the code have been read. I somehow need to delay the javascript
> > parsing, until the input of the division in the html that is rendered
> > gets the "project_id" value. This is why i am looking into setTimeOut
> > () js function.
>
> > cheers,
>
> > On Oct 8, 2:08 pm, "Dan G. Switzer, II" 
> > wrote:
>
> > > Adonis,
> > > The $.post() function is asynchronous (by default) when your code hits a
> > > $.post() call, it'll keep executing code. In order to do something with 
> > > the
> > > results of your AJAX call, you'll want to use the callback option--which 
> > > is
> > > a function run when the AJAX call is completed.
>
> > > -Dan
>
> > > On Thu, Oct 8, 2009 at 7:14 AM, Adonis  wrote:
>
> > > > I am not entirely sure if i am using proper definitions here, but here
> > > > it goes..
>
> > > > I have $.post() inside javascript functions. If ajax is successfull,
> > > > it returns data from the server. I am trying to assign this data  to
> > > > javascript global variables. The problem is that my global javascript
> > > > variables end up to be empty. It seems it takes time for the ajax to
> > > > return the data and by the time the server data is returned, the
> > > > browser has comploted reading through the rest of the javascript
> > > > functions. Thus, leaving my global variables empty.
>
> > > > Do you have any suggestions on how this could be fixed? I am trying
> > > > setTimeOut() at the moment but i would be glad to concider other
> > > > solutions as well..
>
> > > > I could provide code examples on request.
>
> > > > Thanks in advance!


[jQuery] Re: $.post() speed

2009-10-09 Thread Adonis

ok, here is an effort to sum up the code..

*
function initialiseLegendLayerGroupEntry(a,b,c,d,e,f) {
var x;
$("#division_name").bind("click", function() {
if(this.value == "sth") {
y=callFunction(a,b,c,d,e,f);
$.ajax({
type: "POST",
url: "/serverFunction/",
data: {project_name:d,layer_name:e,group_name:f},
success: function(msg){
$("#an entry point for html files that are
served").after(msg);
alert( $("#division where the wanted value is
stored").val() );  // this alert window pops up at the end.
x= $("#division where the wanted value is
stored").val();
 }
});
alert(x); // this pop up window is always empty. it opens while i
still receive "print" commands from my server script !
}
});
}

I think this code is a good example of my problem. Can you identify an
error somewhere?

thanks,

On Oct 8, 6:07 pm, MorningZ  wrote:
> You should should the specific $.post() code in detail, there's
> something you are missing because when you get back from the async
> call, everything (global variables, page objects) are fully available
> at that point... there's zero need to use setTimeout
>
> On Oct 8, 12:27 pm, Adonis  wrote:
>
> > Dan,
>
> > I used a $.ajax() call with a callback -> success: function(msg) etc.
> > but still it does not work the way I want to.
> > from the server side i am using,
>
> > *
> > return render_to_response("blah.html",{ 'project_id':project_id },
> > context_instance = RequestContext(request))
> > *
> > putting the project_id in a 
> > >
>
> > and if the ajax call is successfull i do this,
>
> > *
> > alert( $(#klain).val() );
> > *
>
> > The alert window does pop up, but after the rest of the functions in
> > the code have been read. I somehow need to delay the javascript
> > parsing, until the input of the division in the html that is rendered
> > gets the "project_id" value. This is why i am looking into setTimeOut
> > () js function.
>
> > cheers,
>
> > On Oct 8, 2:08 pm, "Dan G. Switzer, II" 
> > wrote:
>
> > > Adonis,
> > > The $.post() function is asynchronous (by default) when your code hits a
> > > $.post() call, it'll keep executing code. In order to do something with 
> > > the
> > > results of your AJAX call, you'll want to use the callback option--which 
> > > is
> > > a function run when the AJAX call is completed.
>
> > > -Dan
>
> > > On Thu, Oct 8, 2009 at 7:14 AM, Adonis  wrote:
>
> > > > I am not entirely sure if i am using proper definitions here, but here
> > > > it goes..
>
> > > > I have $.post() inside javascript functions. If ajax is successfull,
> > > > it returns data from the server. I am trying to assign this data  to
> > > > javascript global variables. The problem is that my global javascript
> > > > variables end up to be empty. It seems it takes time for the ajax to
> > > > return the data and by the time the server data is returned, the
> > > > browser has comploted reading through the rest of the javascript
> > > > functions. Thus, leaving my global variables empty.
>
> > > > Do you have any suggestions on how this could be fixed? I am trying
> > > > setTimeOut() at the moment but i would be glad to concider other
> > > > solutions as well..
>
> > > > I could provide code examples on request.
>
> > > > Thanks in advance!


[jQuery] Re: $.post() speed

2009-10-09 Thread Adonis

ok, here is an effort to sum up the code..

*
function initialiseLegendLayerGroupEntry(a,b,c,d,e,f) {
var x;
$("#division_name").bind("click", function() {
if(this.value == "sth") {
y=callFunction(a,b,c,d,e,f);
$.ajax({
type: "POST",
url: "/serverFunction/",
data: {project_name:d,layer_name:e,group_name:f},
success: function(msg){
$("#an entry point for html files that are
served").after(msg);
alert( $("#division where the wanted value is
stored").val() );  // this alert window pops up at the end.
x= $("#division where the wanted value is
stored").val();
 }
});
alert(x); // this pop up window is always empty. it opens while i
still receive "print" commands from my server script !
}
});
}

I think this code is a good example of my problem. Can you identify an
error somewhere?

thanks,

On Oct 8, 6:07 pm, MorningZ  wrote:
> You should should the specific $.post() code in detail, there's
> something you are missing because when you get back from the async
> call, everything (global variables, page objects) are fully available
> at that point... there's zero need to use setTimeout
>
> On Oct 8, 12:27 pm, Adonis  wrote:
>
> > Dan,
>
> > I used a $.ajax() call with a callback -> success: function(msg) etc.
> > but still it does not work the way I want to.
> > from the server side i am using,
>
> > *
> > return render_to_response("blah.html",{ 'project_id':project_id },
> > context_instance = RequestContext(request))
> > *
> > putting the project_id in a 
> > >
>
> > and if the ajax call is successfull i do this,
>
> > *
> > alert( $(#klain).val() );
> > *
>
> > The alert window does pop up, but after the rest of the functions in
> > the code have been read. I somehow need to delay the javascript
> > parsing, until the input of the division in the html that is rendered
> > gets the "project_id" value. This is why i am looking into setTimeOut
> > () js function.
>
> > cheers,
>
> > On Oct 8, 2:08 pm, "Dan G. Switzer, II" 
> > wrote:
>
> > > Adonis,
> > > The $.post() function is asynchronous (by default) when your code hits a
> > > $.post() call, it'll keep executing code. In order to do something with 
> > > the
> > > results of your AJAX call, you'll want to use the callback option--which 
> > > is
> > > a function run when the AJAX call is completed.
>
> > > -Dan
>
> > > On Thu, Oct 8, 2009 at 7:14 AM, Adonis  wrote:
>
> > > > I am not entirely sure if i am using proper definitions here, but here
> > > > it goes..
>
> > > > I have $.post() inside javascript functions. If ajax is successfull,
> > > > it returns data from the server. I am trying to assign this data  to
> > > > javascript global variables. The problem is that my global javascript
> > > > variables end up to be empty. It seems it takes time for the ajax to
> > > > return the data and by the time the server data is returned, the
> > > > browser has comploted reading through the rest of the javascript
> > > > functions. Thus, leaving my global variables empty.
>
> > > > Do you have any suggestions on how this could be fixed? I am trying
> > > > setTimeOut() at the moment but i would be glad to concider other
> > > > solutions as well..
>
> > > > I could provide code examples on request.
>
> > > > Thanks in advance!


[jQuery] Re: $.post() speed

2009-10-08 Thread Adonis

Dan,

I used a $.ajax() call with a callback -> success: function(msg) etc.
but still it does not work the way I want to.
from the server side i am using,

*
return render_to_response("blah.html",{ 'project_id':project_id },
context_instance = RequestContext(request))
*
putting the project_id in a 

and if the ajax call is successfull i do this,

*
alert( $(#klain).val() );
*

The alert window does pop up, but after the rest of the functions in
the code have been read. I somehow need to delay the javascript
parsing, until the input of the division in the html that is rendered
gets the "project_id" value. This is why i am looking into setTimeOut
() js function.

cheers,



On Oct 8, 2:08 pm, "Dan G. Switzer, II" 
wrote:
> Adonis,
> The $.post() function is asynchronous (by default) when your code hits a
> $.post() call, it'll keep executing code. In order to do something with the
> results of your AJAX call, you'll want to use the callback option--which is
> a function run when the AJAX call is completed.
>
> -Dan
>
> On Thu, Oct 8, 2009 at 7:14 AM, Adonis  wrote:
>
> > I am not entirely sure if i am using proper definitions here, but here
> > it goes..
>
> > I have $.post() inside javascript functions. If ajax is successfull,
> > it returns data from the server. I am trying to assign this data  to
> > javascript global variables. The problem is that my global javascript
> > variables end up to be empty. It seems it takes time for the ajax to
> > return the data and by the time the server data is returned, the
> > browser has comploted reading through the rest of the javascript
> > functions. Thus, leaving my global variables empty.
>
> > Do you have any suggestions on how this could be fixed? I am trying
> > setTimeOut() at the moment but i would be glad to concider other
> > solutions as well..
>
> > I could provide code examples on request.
>
> > Thanks in advance!


[jQuery] $.post() speed

2009-10-08 Thread Adonis

I am not entirely sure if i am using proper definitions here, but here
it goes..

I have $.post() inside javascript functions. If ajax is successfull,
it returns data from the server. I am trying to assign this data  to
javascript global variables. The problem is that my global javascript
variables end up to be empty. It seems it takes time for the ajax to
return the data and by the time the server data is returned, the
browser has comploted reading through the rest of the javascript
functions. Thus, leaving my global variables empty.

Do you have any suggestions on how this could be fixed? I am trying
setTimeOut() at the moment but i would be glad to concider other
solutions as well..

I could provide code examples on request.

Thanks in advance!


[jQuery] Re: post an array

2009-09-09 Thread Adonis

Hello,

I managed to post my array by calling toString() javascript method :

$.ajax({
type: "POST",
url: "/addFeature/",
data: {project_name:project_name,
'vertexArray':vertexArray.toString()},
success: function(msg){
alert("done");
}
});

I dunno if this is proper or not but it works and that is fine for
now!
Thanks for the help.


On Sep 9, 2:08 pm, Alex Weber  wrote:
> You can'tposta javascript object, its gotta be key-value pairs
> if the data is coming from a form you can do:
>
> var serial = $('#myform').serialize();
>
> andpostthe variable serial
>
> if not then as far as I know you gotta convert the object into key-
> value pairs some other way!
>
> On Sep 9, 6:13 am, Adonis  wrote:
>
>
>
> > Hi,
>
> > I can not upload anarrayto the server...
>
> > I am using this:
>
> > $.post("/addPolyline/", {project_name:project_name,
> > polyline_coordinates:vertexArray}, function(data){
> > alert("Done");
>
> > });
>
> > project_name is a string.
> > The vertexArray contains coordinates so it could look like this:
> > [(-11.2323,34.3455),(12.2323,34.3455),(18.2323,-78.3455),
> > (13.2323,35.3455)]. The server side is fine because it works if i do
> > not send thearray.
>
> > I tried different syntax such as the site recommends(e.g
> > 'polyline_coordinates[]':vertexArray) but still it does not work...
>
> > Any ideas?- Hide quoted text -
>
> - Show quoted text -


[jQuery] post an array

2009-09-09 Thread Adonis

Hi,

I can not upload an array to the server...

I am using this:

$.post("/addPolyline/", {project_name:project_name,
polyline_coordinates:vertexArray}, function(data){
alert("Done");
});

project_name is a string.
The vertexArray contains coordinates so it could look like this:
[(-11.2323,34.3455),(12.2323,34.3455),(18.2323,-78.3455),
(13.2323,35.3455)]. The server side is fine because it works if i do
not send the array.

I tried different syntax such as the site recommends(e.g
'polyline_coordinates[]':vertexArray) but still it does not work...

Any ideas?