We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,650 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

how to use php variable outside onload function

this is my as2 code , i m trying to get variable t outside the onload function but failed , somebody help me !!!

$i=0;
myData = new LoadVars() 
    myData.load("http://localhost/exercise/"+$i+".php") 
    myData.onLoad = function(succes)
	{ 
      if(succes){ 
          var t:Number =myData.total_pages;
		  a.text=myData.t1
		  b.text=myData.t2
		  c.text=myData.t0
		  tp.text=t
		
                } 
	else trace ("Error loading data") 
    } 

 next_.onRelease = function()
   
		  { 
    $i++;
    if($i<=t)
    {
  submitDataToTextfile();
  trace(t) // this is not working
   }
   }
1
Contributor
0
Replies
1
View
aaloo
Junior Poster in Training
85 posts since Oct 2011
Reputation Points: 22
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page generated in 0.0523 seconds using 2.66MB