logo

New Response

« Return to the main article

You are replying to:

  1. Hi Jake, Thanks for the nice article. I do agree with you that Javascript is the most cumbersome language of all. It can sometime takes days to find a solution for certain problems. Cutting the long story short. I am struggling with a similar javascript error. I have tried debugging and found the cause of problem but for some reason couldn't find the solution. Please could you shed some light, it would be great help

    I have pasted the Javascript code below

    "function chgPM(src) {" + @NewLine + " var pm = src.options[src.selectedIndex].text;" + @NewLine + " var path = \'sys_wv?OpenForm&View=" + view + "&Sort=" + sort + "&Start=1&Count=" + CountNum + "&Query=\' + pm;" + @NewLine + " window.location.href = path; }"

    This lets users select a name from dropdown list and append the name to the url as a view search criteria and displays records with this name only. Which works fine with names which doesn't have ' in them. As soon as it encounters a name with apostrophe it startts failing and gives out weird error.

    Thanks in advance.

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: