Need to call a Javascript function
Posted: Fri Aug 24, 2007 2:04 pm
I'm trying to make a form in such a way that when the user click on a button, a form should be displayed. In the form, there is a text area. I converted that textarea into a WYSIWYG textarea using a javascript file wysiwyg.js which is included in the header file. The js file expects something like the following to convert the default text area:
The radio button that I talked about in the beginning is linked to an Ajax call function that when it is selected, makes a call to a php script that sends the form's html to the current page to be displayed.
For example,
register.php --> Current file displayed to user in which the radio button is there. Depending on the radio button that was selected, an ajax call is made to content.php
content.php --> Contains a if loop that determines which radio button was pressed and sends a html output of a form to register.php for display
The problem is that the javascript is not being sent by the content.php file i.e. the generate_wysiwyg('abstraction'); and as a result, the text area is not being converted. Can someone help me get out of this problem please?
Code: Select all
<textarea name="abstractbox" id="abstractbox"></textarea><script language="JavaScript">generate_wysiwyg('abstractbox');</script>For example,
register.php --> Current file displayed to user in which the radio button is there. Depending on the radio button that was selected, an ajax call is made to content.php
content.php --> Contains a if loop that determines which radio button was pressed and sends a html output of a form to register.php for display
The problem is that the javascript is not being sent by the content.php file i.e. the generate_wysiwyg('abstraction'); and as a result, the text area is not being converted. Can someone help me get out of this problem please?