Welcome Guest, Not a member yet? Register   Sign In
Anchor URL helper calls page not function
#8

[eluser]Mirge[/eluser]
[quote author="edziffel" date="1311462147"]Yes. I know what you mean. If you look up anchor in the users guide,
http://ellislab.com/codeigniter/user-gui...elper.html
then you arrive at the conclusion that you are referring to.

However if you check out the tutorial linked to on the home page under video tutorials
http://codeigniter.com/tutorials/
reference the part where the comments link is being added to the database view page in the second tutorial it looks like if you specify in the url the controller, then the next part of the URL becomes a call to a function. IE, using my controller, ....... drawback/db_upload. Which is or isn't working depending on whether you want the web page or what I want, the call to the function on the controller.

That being said, I could easily move the function to the db_upload_view.php page and use the anchor function to call it, but doesn't that defeat the whole idea of using a controller page?

Maybe the question I need to ask is if like you say, the anchor function isn't going to work to call a function on the controller page, than how should I go about it?

The reinstall is all about getting a proper working system to eliminate unseen grief from that. Learned over the years to clean up the whole thing not just part if you want good results. :-)[/quote]

anchor() is working exactly as it says it does. I'm not sure where exactly you're getting confused.

Example syntax would be: anchor("controller_class/method_name")

Which would access method_name() method in controller_class.

The second argument supplied to anchor() would be the link text you want to use. IE: "click here to access method_name."


Messages In This Thread
Anchor URL helper calls page not function - by El Forum - 07-21-2011, 12:18 PM
Anchor URL helper calls page not function - by El Forum - 07-21-2011, 01:22 PM
Anchor URL helper calls page not function - by El Forum - 07-21-2011, 01:57 PM
Anchor URL helper calls page not function - by El Forum - 07-21-2011, 02:12 PM
Anchor URL helper calls page not function - by El Forum - 07-23-2011, 10:03 AM
Anchor URL helper calls page not function - by El Forum - 07-23-2011, 10:07 AM
Anchor URL helper calls page not function - by El Forum - 07-23-2011, 12:02 PM
Anchor URL helper calls page not function - by El Forum - 07-23-2011, 12:13 PM
Anchor URL helper calls page not function - by El Forum - 07-23-2011, 02:32 PM
Anchor URL helper calls page not function - by El Forum - 07-23-2011, 03:14 PM
Anchor URL helper calls page not function - by El Forum - 07-23-2011, 03:54 PM
Anchor URL helper calls page not function - by El Forum - 07-23-2011, 04:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB