2 javascript in 1 design page/2 functions in 1 script tag??

Posted by Oswaldlily under ASP.NET on 9/29/2011 | Points: 10 | Views : 1295 | Status : [Member] | Replies : 4
1)Is it possible to perform 2 javascripts in a single design page
2)Is it possible to write 2 functions inside single script tag


Need answer for both questions..plz provide me

<script type="text/javascript">
function OpenConfirm() {
alert('Invisible datas appear');
}
</script>
<script type="text/javascript">
function Open() {
var a = confirm('How to further continue?');
return true;
}
</script>




Responses

Posted by: Oswaldlily on: 9/29/2011 [Member] Starter | Points: 25

Up
0
Down
How to call these 2 functions from codebehind???

if

/* call one function */

else

/* call another function */
end if


Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Blessyjees on: 9/29/2011 [Member] Bronze | Points: 25

Up
0
Down
Hi,

You can write any numbers of functions in sigle script tag and same in the case of script tag also.

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Blessyjees on: 9/29/2011 [Member] Bronze | Points: 25

Up
0
Down
Hi
try like this
ClientScript.RegisterStartupScript(this.GetType(), 

"Js function", "return fnValidate();", true);


Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Oswaldlily on: 9/29/2011 [Member] Starter | Points: 25

Up
0
Down
@Blessyjees

Code not workin...not even getting single message box

<asp:LinkButton ID="lnk" runat="server"OnClick="lnk_Click" Visible="true" ></asp:LinkButton>

should i mention Onclient click here..
If so how to return 2 functions in Onclientclick

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response