Hi, i have a external javascript. The path to this is :/javascrpit/MyJavaScript.js
I would like to pass the form address as a parameter to the function so that i can have my pop up coding reuse while it can perform the pop up for different form.I have already tested that my javascript function is working as i show below
My coding in the parent page is as below:
Code:
If Page.IsPostBack = False Then
Page.ClientScript.RegisterClientScriptInclude("MyScript", "javascript/MyJavaScript.js")
' this is the coding that working and give me a pop up
'Button1.Attributes.Add("onClick", "return popWin();")
'now i want to customize it so that it can pop up the form based on the paramter i pass in.But it does not work
strUrl = "Default2.aspx"
Button1.Attributes.Add("onclick", "return ppopWin2('" + "Default2.aspx" + "');
End If
My external javascript function is as below
Code:
function popWin(llInp) {
window.open("Default2.aspx","MyBasket","width=800,scrollbars=yes,height=800");
return false;
}
function popWin2(url) {
window.open(url,"MyBasket","width=800,scrollbars=yes,height=800");
return false;
}
Does anyone has anyidea on this ??
The second question i want to ask here is :
(a).How do i start to learn javascrpt. How do i learn to make the interaction between the servr code and the javascript? I have the internet whole day but and reading from
www.3cschool.com but it does not help much in understanding how to use this in coding.. Does anyone mind to share his experience here ?