url - Issue in passing argument to custom protocol through href? -
i have created custom protocol name "myapp" , trying pass arguments via href tag <a href="myapp://e:/file.txt">click here</a>
.
myapp protocol described below:
[hkey_classes_root\myapp] @="\"url:alert protocol\"" "url protocol"="\"\"" [hkey_classes_root\myapp\defaulticon] @="\"c:\\windows\\system32\\notepad.exe,1\"" [hkey_classes_root\myapp\shell] [hkey_classes_root\myapp\shell\open] [hkey_classes_root\myapp\shell\open\command] @="\"c:\\windows\\system32\\notepad.exe\" \"%1\""
on clicking anchor link throws error "the filename, directory name, or volume label syntax incorrect."
i guess argument passed through <a href="myapp:e:/file.txt">
tag not getting recognized.
i have no idea how escape slashes(/) or special character here.
please,help me or let me know if doing wrong.
you have parameter also. here getting url address parameter pass in myapp:
var url = document.location.href ; var arr = url.split("/"); var result = arr[0] + "//" + arr[2] var uri='myapp://'+result;`
Comments
Post a Comment