Results 1 to 2 of 2

Thread: calling java script from jsp

Hybrid View

  1. #1
    Join Date
    Jan 2013

    calling java script from jsp



    I have a jsp page. In this, the body tag has onLoad method. this is all ready existing one and this onload is calling from abc.js .

    if i want to add another onload function in same body tag and we have to call second onload from another javascript file. for this what i have to do?

    please help out me?

    Existing code: <body onload=javascript:"function1();return false;">?

    the above code is already existing code. i want to call another function2() from above body tag. for that what i have to do?

    fuction1() implemented in abc.js
    function2() implemented in def.js

    please help out me?


  2. #2
    Join Date
    Aug 2008
    There are errors in the code - the javascript: part should not be there, and you don't have to return anything in the onload attribute. Anyway, you can include several statements in the onload attribute:

    <body onload="function1(); function2();">
    New to web development or in need of a good reference? Check out the Mozilla Developer Network or W3Schools.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles