Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
How to Include .JS in CGI?
rahulindia
Hi,
I am trying to use .js files the CGI but their are not getting executed.
[HTML]
print "Content-type: text/html \n\n";
$htmlstr = "\n";
$htmlstr .= "\n";
$htmlstr .= "\n";
$htmlstr .= "\n";
$htmlstr .= "\n";
$htmlstr .= "\n";
$htmlstr .= "\n";
$htmlstr .= "\n";
$htmlstr .= "function init() {\n";
$htmlstr .= " t = new Bs_Tree();\n";
$htmlstr .= " t.imageDir = '../../../components/tree/img/win98/';\n";
$htmlstr .= " t.useRadioButton = true;\n";
$htmlstr .= " a[0]['children'][0]['radioButtonSelected'] = true;\n";
$htmlstr .= " t.initByArray(a);\n";
$htmlstr .= " t.drawInto('treeDiv1');\n";
$htmlstr .= "}\n";
$htmlstr .= "\n";
$htmlstr .= "\n";
$htmlstr .= "\n";
$htmlstr .= "
JavaScript Bs_Tree example 8
\n";
$htmlstr .= "like example 1, but uses the radio button feature.\n";
$htmlstr .= "\n";
$htmlstr .= "
\n";
$htmlstr .= "\n";
$htmlstr .= "\n";
$htmlstr .= "\n";
print $htmlstr;
[/HTML]
I Also tried to incorporate as :
[HTML]
print "Content-type: text/html \n\n";
print<
EOF
[/HTML]
But still .js files are not loaded in to CGI.
Can anybody suggest me ?
Thanks,
Rahul
Find more posts tagged with
Comments
Adam Stoller
This is kind of basic web stuff - HTML code requires that javascript code be defined within <script>...</script> tags.