Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
82
rated 0 times [  84] [ 2]  / answers: 1 / hits: 6205  / 10 Years ago, tue, may 27, 2014, 12:00:00

I'm trying to run a simple function.



function assify(ass) {
window.location.href(ass);
}


The parameter I'm running into it is assify?id=2



I keep getting an error though (Uncaught TypeError: String is not a function)



What's going wrong here?



Thanks!


More From » javascript

 Answers
11

href is a property and not a method.



window.location.href = ass;


[#44995] Tuesday, May 27, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kevenirvina

Total Points: 315
Total Questions: 112
Total Answers: 84

Location: Vanuatu
Member since Fri, May 13, 2022
2 Years ago
;