Hello,
I have a perl file that generates an html file to use on a webpage. I have to add some javascript to the html part of the perl file.
I already have some code to do that, but here is the issue: the javascript needs to grab a parameter from the perl information.
eg., lets say I need to run javascript that uses a directory name for example, and that directory can change. So I cannot hardcode it...instead, I have a variable called $dir to store that information. How can I generate the javascript part and pass it the contents of $dir, so that the javascript points to the correct directory when executing?
Thanks
I have a perl file that generates an html file to use on a webpage. I have to add some javascript to the html part of the perl file.
I already have some code to do that, but here is the issue: the javascript needs to grab a parameter from the perl information.
eg., lets say I need to run javascript that uses a directory name for example, and that directory can change. So I cannot hardcode it...instead, I have a variable called $dir to store that information. How can I generate the javascript part and pass it the contents of $dir, so that the javascript points to the correct directory when executing?
Thanks