Hello,
Can someone help me with the following situation??
I have a Hyperlink within a String like below:
sSql = "SELECT DISTINCT " + "'Action' = '<center><a
href='+char(34) +'ChangeRequest .aspx?ID='+cast (ChangeRequest. ChangeRequest_I D
as nvarchar) +CHAR(34)+'>Ope n</a></center>',"
I want to invoke a Client side javascript function and pass the value
of the ID. How can I accomplish this such when a user clicks "Open" he
goes to a new window with the same ID.
I tried this but it does not work:
On Server side:
sSql = "SELECT DISTINCT " + "'Action' = '<center><a href= 'javascript:
NewWindow('+cas t(ChangeRequest .ChangeRequest_ ID as nvarchar)+
CHAR(34)+)'>Ope n</a></center>',"
On Client side:
function NewWindow(myID)
{
window.open("Ch angeRequest.asp x?ID="+myID,"Wi ndowName","widt h=500,height=60 0");
}
</script>
Can someone help me with the following situation??
I have a Hyperlink within a String like below:
sSql = "SELECT DISTINCT " + "'Action' = '<center><a
href='+char(34) +'ChangeRequest .aspx?ID='+cast (ChangeRequest. ChangeRequest_I D
as nvarchar) +CHAR(34)+'>Ope n</a></center>',"
I want to invoke a Client side javascript function and pass the value
of the ID. How can I accomplish this such when a user clicks "Open" he
goes to a new window with the same ID.
I tried this but it does not work:
On Server side:
sSql = "SELECT DISTINCT " + "'Action' = '<center><a href= 'javascript:
NewWindow('+cas t(ChangeRequest .ChangeRequest_ ID as nvarchar)+
CHAR(34)+)'>Ope n</a></center>',"
On Client side:
function NewWindow(myID)
{
window.open("Ch angeRequest.asp x?ID="+myID,"Wi ndowName","widt h=500,height=60 0");
}
</script>
Comment