Welcome Guest, Not a member yet? Register   Sign In
Frustrating redirect issue
#1

[eluser]shiggins[/eluser]
I have drop down menu in a form which onChange calls a javascript function which redirects to "ship/"+arg1+"/"+id using the window location method.

I have set up my route as
Code:
$route['ship/([a-zA-Z._]+)/(:num)']  = "ship/main/$1/$2";

So the newly generated url is
Code:
http//:blahblah.com/bsd/index.php/ship/rlocation/19

This method (main) is the same one used to generate the form in the first place, so I know it's working and of course the same view files are called. Furthermore all the links to javascript and css files work fine until the redirect takes place.

However when the page loads all hell breaks loose. None of the paths to css or javascript files in the page header can be found. Consequently nothing works nor does the page render correctly. Additionally all the links on the page are weird as well...

For instance the all contain the first 2 segments of the url ship/rlocation and then the link segment is added. So the link to Contact Us is
Code:
http//:blahblah.com/bsd/index.php/ship/rlocation/contact

I'm sure others have had this problem. Your help is greatly appreciated.
#2

[eluser]GSV Sleeper Service[/eluser]
make sure you use absolute paths for css and javascript




Theme © iAndrew 2016 - Forum software by © MyBB