I have a method named load_comments() which is something Like this
Now i need to send a request to that endpoint from javascript but i get an error of argument count error. Which means i cant load www.myWebsite.com/store/load_comments/abcde/12.
Just for an example. So my question is how do i solve it?
Hiw do i use more than one argument in a method
4 years ago
4 years ago
#1
4 years ago
#2
Hi Mayex,
I think you are confusing yourself and the best place to learn this is in the docs > https://trongate.io/docs/information/reading-values-from-the-url
Your code with a bit of modification will work using segment(x)
using this URL: http://localhost/app_name/store/load_comments/abcde/12
the result:
I think you are confusing yourself and the best place to learn this is in the docs > https://trongate.io/docs/information/reading-values-from-the-url
Your code with a bit of modification will work using segment(x)
using this URL: http://localhost/app_name/store/load_comments/abcde/12
the result:
4 years ago
#3
Alright thanks. I didn't know the segment() could be used to check more than 3 segments.
Thanks!!!
Thanks!!!
4 years ago
#4
No probs Mayex, happy to help.
Could you please close off the thread if you think you have received the correct answer
Could you please close off the thread if you think you have received the correct answer