Thursday, May 23, 2024
 Popular · Latest · Hot · Upcoming
14
rated 0 times [  18] [ 4]  / answers: 1 / hits: 46966  / 11 Years ago, mon, july 15, 2013, 12:00:00

I have written the following javascript function



function getval(sel)
{
window.location.href = Posts?Category=<%= sel %>;
}


but the value of sel variable is not considered in querystring..



Instead of it, it takes value like following.



...../Post/Posts?Category=%3C%=%20sel%20%%3E



Can anyone help me???


More From » javascript

 Answers
35

Because javascript does not understands jsp scriptlet,



Try,



window.location.href = Posts?Category= + sel;

[#76990] Saturday, July 13, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
zoey

Total Points: 120
Total Questions: 103
Total Answers: 105

Location: Marshall Islands
Member since Mon, May 31, 2021
3 Years ago
;