About Javascript in perl

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sasimca007
    New Member
    • Sep 2007
    • 129

    #1

    About Javascript in perl

    Hi friends,
    I have one small doubt that we can write the html code in perl program as saying by content-type: text/html but when i write javascript code that is printing on the browser not as javascript functionality.

    My main doubt is how can we write javascript code in perl program?
  • KevinADC
    Recognized Expert Specialist
    • Jan 2007
    • 4092

    #2
    Originally posted by sasimca007
    Hi friends,
    I have one small doubt that we can write the html code in perl program as saying by content-type: text/html but when i write javascript code that is printing on the browser not as javascript functionality.

    My main doubt is how can we write javascript code in perl program?
    javascript is just text that perl outputs to a browser, so you just wrap it in the correct http headers and html tags and it will work when loaded in a web browser. Its impossible to say what you might have done wrong without seeing what you have tried.

    Comment

    • Icecrack
      Recognized Expert New Member
      • Sep 2008
      • 174

      #3
      Post the code that your trying to work with and as Kevin Said, Perl just dumps the output to the browser, JavaScript runs off the browser plugin. so javascript will be read from the browser and run at the client end.

      Comment

      Working...