Johannes Becker wrote:

Sory for the late reply but my internet was temporarely down.

> please explain, what are you trying to do
Right after cocoon.sendPage I want to set a global variable. Thats all.


I solved the problem like this. But looking at this piece of code again, I wonder why it works. Whatever! It woks. I'm happy.

function myFunc(){
  while(myVariable){
      cocoon.sendPage("xxx", {
         myVariable: myVariable,
       });
      myVariable = null:
   }
}

Of course it works. ;-D

The second parameter in sendPage() is just reading the value of your global variable. ;-) In other way, the value sent in the sendPage() has the same value as your global variable, but they not share the same space value. are not the same is the same variable as your global variable.

Best Regards,

Antonio Gallardo


Cheers
Jonny


Antonio Gallardo wrote:

IIRC, sendPage forks the execution, so if you set the variable right after the sendPage() call, is posible the global variable is setted before the sendPage() call finish.

Hmm.... please explain, what are you trying to do. Perhaps there is another way to accomplish that.

Best Regards,

Antonio Gallardo.

Johannes Becker wrote:

Hi,

I've got a function.

function myFunc(){
  ...
  cocoon.sendPage("xxx", {
     myVariable: myVariable,
  });
}

Right after this cocoon.sendPage I want to set a global variable (in my case
myVariable) "automatically":
myVariable = null;

But how can I do that?

Thanks
Jonny



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to