|
-
Passing Javascript Replace function as an argument of user defined function
Hi,
I am facing a problem in passing replace() function as an argument in user defined java function, can any one help me how to resolve it?
intention is to pass a file path to my user defined function, but before passing the path i want to replace the character '\' to '\\'
I am posting my javascript function here:
<a href="#" onclick="OpenDocPreview('<%# Eval("PATH")%>'.replace(/\\/g,"\\\\"), '<%# Eval("Filename")%>')"><%# Eval("DocTitle") %></a>
function OpenDocPreview(url, docname) {
alert('message from search base : ' + url + ' ' + docname);
}
thank you,
-
use json tools so you don't have to worry about escapes...
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|
Bookmarks