Hi all,
I have a page that's returning Form fields and values from a database (I'm using Ajax with PHP/MySQL; I'm also using JQuery framework).
Everything works perfectly, except that for some reason, I am unable to execute javascript on the form's input fields.
Specifically, I am using the JSColor javascript/html Color Picker Script available here: -- Check out the "Demo" section towards the top of page to see what the script can do on the fly. By the way, this script is Framework independent.
The JSColor script works perfectly on any form input field element -- except in the case where the input field element is returned (ie: built) using Ajax.
The script works simply enough: you click inside an input form field and the Color Picker pops up. The "call" to script is made with the "CLASS=Color" attribute inside the Input's Tag. In the case where the input field is built/returned with Ajax - nothing happens.
My guess is that the browser isn't picking up the form input elements on the page (if you view the source code on the page the data returned by Ajax isn't visible).
- So again, I have a page, for example, named: LoadAjaxData.php
- On this page I reference the jscolor script url
- The page returns values from a database using Ajax with PHP/MySQl as back-end
- Form's fields and values are returned properly (NO errors)
- However, javascript doesn't work if you were to click inside input field to make color picker box appear.
- Otherwise, script works as expected on form fields built manually
Has anyone else encountered this or similar issues?
I've browsed the forums and have read posts suggesting the use of eval() and/or Framework-specific functions. However, I'm at a loss as to how to make this work on my page as I'm not really returning any javascript code with my script. I'm only returning the Form's fields and values.
Any and all help, comments, suggestions and insights are welcome.
Thanks!
- T Y H A N D
I have a page that's returning Form fields and values from a database (I'm using Ajax with PHP/MySQL; I'm also using JQuery framework).
Everything works perfectly, except that for some reason, I am unable to execute javascript on the form's input fields.
Specifically, I am using the JSColor javascript/html Color Picker Script available here: -- Check out the "Demo" section towards the top of page to see what the script can do on the fly. By the way, this script is Framework independent.
The JSColor script works perfectly on any form input field element -- except in the case where the input field element is returned (ie: built) using Ajax.
The script works simply enough: you click inside an input form field and the Color Picker pops up. The "call" to script is made with the "CLASS=Color" attribute inside the Input's Tag. In the case where the input field is built/returned with Ajax - nothing happens.
My guess is that the browser isn't picking up the form input elements on the page (if you view the source code on the page the data returned by Ajax isn't visible).
- So again, I have a page, for example, named: LoadAjaxData.php
- On this page I reference the jscolor script url
- The page returns values from a database using Ajax with PHP/MySQl as back-end
- Form's fields and values are returned properly (NO errors)
- However, javascript doesn't work if you were to click inside input field to make color picker box appear.
- Otherwise, script works as expected on form fields built manually
Has anyone else encountered this or similar issues?
I've browsed the forums and have read posts suggesting the use of eval() and/or Framework-specific functions. However, I'm at a loss as to how to make this work on my page as I'm not really returning any javascript code with my script. I'm only returning the Form's fields and values.
Any and all help, comments, suggestions and insights are welcome.
Thanks!
- T Y H A N D