|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
Problem when calling a Javascript function I am having problems while calling the Javascript function while loading jsp. Since, I have recently started doing this, I am not having enough knowledge about it. How can call a JavaScript function to run whenever a particular show jsp? Onload event would be similar to html, not if I have explained well. I think that there should be someone who has good knowledge about this topic. I am requesting to all those person to help me with proper explanation. Any other information would be greatly appreciable.!! ![]() |
#2
| |||
| |||
Re: Problem when calling a Javascript function If you want to call the function, I would say that you will have to do the same way as in HTML : HTML Code: <body onload="javascript:funcion();"> ... </ Body> |
#3
| |||
| |||
Re: Problem when calling a Javascript function The basics: Code: <script> window.onload = function () (... ) </ Script> Code: <script> oldonload = window.onload; window.onload = function () (oldonload (); ... ) </ Script> |
#4
| |||
| |||
Re: Problem when calling a Javascript function Thanks everyone for trying to help me. I have a menu with options : Code: function reset () ( document.form1.option.checked = 0 ) ... name="form1" <form method="post" action="/servlet/inform"> id="timporte" <table width="390"> <tr> <input <td> type="radio" name="option" value="radiobutton"> </ td> <td> Media </ td> </ Tr> <tr> <input type="radio" name="option" <td> value="radiobutton"> </ td> <td> Sum </ td> </ Tr> <tr> <input type="radio" name="option" <td> value="radiobutton"> </ td> <td> Intevalo </ td> </ Tr> <tr> <td height="50"> </ td> <td colspan="2"> <a href = "#" onclick = "javascript : Reset ()">< img src = "icons \ botonreset.png" name = "reset"> </ a> </ Td> </ Tr> </ Table> </ Form> ![]() |
#5
| |||
| |||
Re: Problem when calling a Javascript function How are you trying to call the function from the link..?? so <a href="resetear()"> or <a href = "javascript : Reset () ">I say this because I see that you write this Code: onClick = "javascript : Reset () "> onclick = "javascript : Reset () "but onclick ="reset()" |
#6
| |||
| |||
Re: Problem when calling a Javascript function You should also know the basic things while calling a Javascript function. It passes through each of the elements that share the name. You can try the following code : Code: function reset () ( for (m = 0, m <document.form1.option.length; m + +) ( document.form1.option[m]. checked = false ) ) |
![]() |
|
Tags: html, java, javascript, jquery, jsp, onload event |
Thread Tools | Search this Thread |
|
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calling a JavaScript function from Flash | Allison | Software Development | 5 | 08-02-2011 04:58 PM |
Calling JavaScript from Managed Code | Computer_Freak | Tips & Tweaks | 1 | 03-08-2010 03:31 PM |
c# function equivalent to gettime function in javascript | Omaar | Software Development | 4 | 10-03-2010 10:44 PM |
Problem with the parameters of JavaScript function | Luis234 | Software Development | 4 | 16-03-2009 11:12 AM |
Calling Struts using Javascript | Novino | Software Development | 2 | 25-10-2008 02:42 PM |