Andy - as you may have guessed, you have a scoping issue.  Everything inside 
the doc.ready call is in an anyonymous function.

Any functions inside doc.ready that you need to have access to from *outside* 
doc.ready, you'll need to scope accordingly.

You might want to create a variable outside doc.ready like "var global.fns = 
{}" and then inside doc.ready define your functions like "global.fns.myfunc = 
function()".  This will allow you to have access to the functions in that 
variable from anywhere.

-- Josh



  ----- Original Message ----- 
  From: Andy Matthews 
  To: [jQuery] 
  Sent: Wednesday, April 02, 2008 2:15 PM
  Subject: [jQuery] Func outside of doc.ready cannot access function inside 
doc.ready? Why not?


  As a follow up to my post on "Flex Ajax Bridge & jQuery"...

  I found that if I place the offending code OUTSIDE the doc.ready call, it 
works okay, and the doc.ready still fires correctly. However, the code which is 
outside of the doc.ready call cannot access functions INSIDE the doc.ready call.

  Why is this, and how might I be able to get around it?

  ____________________________________

  Andy Matthews
  Senior ColdFusion Developer

  Office:  615.627.9747
  Fax:  615.467.6249
  www.dealerskins.com

  Total customer satisfaction is my number 1 priority! If you are not 
completely satisfied with the service I have provided, please let me know right 
away so I can correct the problem, or notify my manager Aaron West at [EMAIL 
PROTECTED]

<<2008 Email NADA.jpg>>

Reply via email to