JavaScript and Php variables
Posted: Sun Jan 14, 2007 2:55 pm
Hi guys,
I am working on a project which uses Ajax, pure JavaScript, Php, ActionScript, and others. I have a an ajax script that runs when a user enter a value in a simple textbox in a form. It sends what the user has entered to a .php file which on its own requests an id from a database. After that when a user clicks on some links that have been generated by this .php script there is another ajax which calls a .php file which should (here the problem arose) prints some HTML which displays a .swf file and some JavaScript. The HTML is not the problem so I will not tell more about it but the problem is from the JavaScript. I define two variables which have been got from the last .php file but because they are generated in the middle of the main HTML page they do not correspond to another background JavaScript file which is used to communicate with the ActionScript in the .swf file mentioned above.
My question is whether it is possible to set these variables in Php and if it is how or if there is any way to solve this by JavaScript or any way.
I know that it seems complicated and it really is but I would be really delightful if anyone can help me.
I am working on a project which uses Ajax, pure JavaScript, Php, ActionScript, and others. I have a an ajax script that runs when a user enter a value in a simple textbox in a form. It sends what the user has entered to a .php file which on its own requests an id from a database. After that when a user clicks on some links that have been generated by this .php script there is another ajax which calls a .php file which should (here the problem arose) prints some HTML which displays a .swf file and some JavaScript. The HTML is not the problem so I will not tell more about it but the problem is from the JavaScript. I define two variables which have been got from the last .php file but because they are generated in the middle of the main HTML page they do not correspond to another background JavaScript file which is used to communicate with the ActionScript in the .swf file mentioned above.
My question is whether it is possible to set these variables in Php and if it is how or if there is any way to solve this by JavaScript or any way.
I know that it seems complicated and it really is but I would be really delightful if anyone can help me.