Hi, I need to convert a certain PHP string into a javascript one, i've done a little research and this is what i came up with:

<?php
	$js = new HTML_Javascript();  // the error occurs on this line
	echo $js->startScript();
	echo $js->convertString($url, url, true);
	echo $js->endScript();
?>

the error says: "Fatal error: Cannot instantiate non-existent class: html_javascript"
i pretty much copied the code from a site

thanks for any help.

    awesome_aims wrote:

    i pretty much copied the code from a site...

    ...but you forgot to copy the class definition. you need the class definition for HTML_Javascript before you can create an object instance of it.

      Write a Reply...