Wednesday, 23 December 2015
How to solve Incorrect format to pass parameters into function error in javascript,jquery
JavaScript,jquery function parameters passing errors:
functionname("+sid+","+sname+")
Here suppose we have to pass parameters as
getdata(1,rama)
it doesn't give any error.
If you to pass dates or names end with '.' at that time we got an error
Solution:
functionname("+sid+","+sname+") - wrong format
getdata(1,rama.) - gives error
functionname("+sid+",\"" + sname+ "\") - correct format
functionname("+sid+","+sname+")
Here suppose we have to pass parameters as
getdata(1,rama)
it doesn't give any error.
If you to pass dates or names end with '.' at that time we got an error
Solution:
functionname("+sid+","+sname+") - wrong format
getdata(1,rama.) - gives error
functionname("+sid+",\"" + sname+ "\") - correct format
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment