I'm trying the below and getting OBJECT EXPECTED error in
javascript.
On my aspx page I have this java script block:
<script language="javas cript" type="text/javascript">
function SearchText(sele ctit)
{
document.getEle mentById('TextB ox_Body').creat eTextRange().fi nd(selectit);
}
</script>
In vb.net I'm dynamically generate javascript
<script language='JavaS cript'>
SearchText('car ');
</script>
using this code and passing it the string "car":
Public Function SelectText(ByVa l SearchString As String) As String
Return "<script language='JavaS cript'>" + vbCrLf +
"SearchText ('" + SearchString + "');" + vbCrLf + "</script>"
End Function
I force that block to run as follows and I understand this is not
javascript, but the problem appears to be with my rendered code. Below
is how I pass :
ClientScript.Re gisterClientScr iptBlock(Me.Get Type, "client",
pkb.SelectText( TextBox_Search1 .Text))
Thanks for any help or information.
javascript.
On my aspx page I have this java script block:
<script language="javas cript" type="text/javascript">
function SearchText(sele ctit)
{
document.getEle mentById('TextB ox_Body').creat eTextRange().fi nd(selectit);
}
</script>
In vb.net I'm dynamically generate javascript
<script language='JavaS cript'>
SearchText('car ');
</script>
using this code and passing it the string "car":
Public Function SelectText(ByVa l SearchString As String) As String
Return "<script language='JavaS cript'>" + vbCrLf +
"SearchText ('" + SearchString + "');" + vbCrLf + "</script>"
End Function
I force that block to run as follows and I understand this is not
javascript, but the problem appears to be with my rendered code. Below
is how I pass :
ClientScript.Re gisterClientScr iptBlock(Me.Get Type, "client",
pkb.SelectText( TextBox_Search1 .Text))
Thanks for any help or information.
Comment