Passing $year & $month between functions from calendar |
[eluser]SidharthaXx[/eluser]
Hi All, I'm new to CI... so bear with me! I'm using a monthly calendar, and using it to move into another view (i.e. I click on a day and it takes me to another view). At the moment the year & month seem to be passed to Index() in the controller... that's fine. However, I'm not clear how I get the month & the year passed to other functions... for example, when I detect a click (in my .js assets file the path of which is specified in my path) I then pass to another function in the controller which loads a new view... I want that new view to have access of the year & month from the calendar click that lead to the new view being loaded. Can anyone give me some pointers...? Many Thanks
[eluser]SidharthaXx[/eluser]
Well, this is where I'm a little confused (C++ background!)... I have initiated a POST via ajax in a different function already... that post is issued from my .js assets file... however, as I understand it, $year & $month in my controller Index() function which are populated via the calendar library are not accessable from that .js file... I know I'm missing something here... just not sure what it is! Should I be posting from the controller to my view? To the .js file? Thanks for your help.
[eluser]Mauricio de Abreu Antunes[/eluser]
Post your code, plz? I got your point and i'll help you. :-)
[eluser]SidharthaXx[/eluser]
Thanks. Some code is commented out as not being used right now... I've attached a number of file, fundamentally, this is the flow of control, and what I'm trying to do... booking.php, booking_model.php & booking_view.php are all loaded initially... showing a monthly calendar... All good. From that calendar, I click on a day and I move on (via the click capture in a booking.js file) to book_specify in the booking.php controller to load a new view... book_specify_view.php... It's all relatively simple... but where I'm getting stuck is this... the calendar seems to return the $year & $month to the Index() in controller... and what I need to do is pass that $year & $month from the click action into the new book_specify_view.php view... I hope that's clear. Thanks so much for your time. Probably easiest if I attach all the files into a public dropbox folder... http://db.tt/kVAvsINj |
Welcome Guest, Not a member yet? Register Sign In |