Announcement

Collapse
No announcement yet.

I can define an attribute as a vector?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • I can define an attribute as a vector?

    I am defined a atribute as accarray as name

    and I use it in a Scriptinit event
    as
    for ($i = 0; $i <= 49; $i++) {
    {accarray[$i]} = {rs[0][$i]};
    }

    but when I try use the value of {accarray[0]} in an ajax event, I receive a blank as result.

  • #2
    Be sure to understand that your rs variable has to be declared at the right spot. You may be using rs for something else as well. So in case of doubt rename rs to a unique name.

    Comment


    • #3
      Hello rr, Thanks for your reply. Yes I have declarated the rs variable in the right site, also has the unique name. In fact the problems is the scope of the vector. for example if I put a echo in the Scriptinit event "echo {accarray[10]};" I get the right value, but if I put the same echo in any ajax event I get wrong value (blank value).

      Comment


      • #4
        That issue may be happening because SC thinks your index is actually a global variable. I'd look there.

        regards,
        Bernhard Bernsmann

        Comment

        Working...
        X