Welcome Guest, Not a member yet? Register   Sign In
codeigniter url's with hmvc and ajax -- addressing problem.
#1

[eluser]mlakhara[/eluser]
Hello everyone.
I am trying to load content using jquery .load function from one of my views.
at the server end I have the controller function which does something based on the argument passed from the browser.
The code snippet is
Code:
$("#ContentDiv").load('timetable/admin/1', param, function(str) {

In this particular line I am calling the admin function of timetable controller and passing the argument '1' to the function. This addressing however is creating problems.

In chrome it is being referenced as
Code:
http://localhost/index.php/timetable/timetable/admin/1

In firefox however this is interpreted as
Code:
http://localhost/index.php/timetable/timetable/admin/timetable/admin/1

The initial view is created using the timetable controller's admin function using argument 0.

Thanks in advance.
#2

[eluser]Pedroshow[/eluser]
Code:
$("#ContentDiv").load('/timetable/admin/1', param, function(str) {
#3

[eluser]mlakhara[/eluser]
No this wont work.. it will form
Code:
http://localhost/timetable/admin/1
#4

[eluser]Pedroshow[/eluser]
how did you want it?




Theme © iAndrew 2016 - Forum software by © MyBB