Answer the question
In order to leave comments, you need to log in
How to send an ajax request to the same page I'm on?
Being on the page (url: "/calendar/25"), how can I send an ajax request to it, passing some parameter, for example, the date?
my controller:
public function actionCalendar($id){
//нужно чтобы здесь было доступно и $id, и $date
}
Answer the question
In order to leave comments, you need to log in
in the form in the inputs you pass the date and url parameters, and in the controller you parse the url with regular expressions and you will have an id, just make the controller without parameters
Logically, you can put a certain condition and return
return $this->content();
public function actionCalendar($id, $data = ''){
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question