Welcome Guest, Not a member yet? Register   Sign In
OnClick with popup
#2

[eluser]jcopling[/eluser]
From the documentation:
Quote:Here are some examples:

echo anchor('news/local/123', 'My News');
Would produce: <a href="http://example.com/index.php/news/local/123" title="My News">My News</a>

echo anchor('news/local/123', 'My News', array('title' => 'The best news!'));
Would produce: <a href="http://example.com/index.php/news/local/123" title="The best news!">My News</a>

The anchor and anchor_popup functions from the URL helper do not return URL strings, they return HTML anchor entities. So by using the anchor function to set the window location you would be producing something like:

http://<a href="http://www.mydomain/com">Click Me!</a>

Instead, you would use the base_url function to produce the URL string that you want to direct to:
Code:
onClick="window. location. href='&lt;?= base_url();?&gt;news/local/123;"


Messages In This Thread
OnClick with popup - by El Forum - 10-13-2008, 02:49 PM
OnClick with popup - by El Forum - 10-13-2008, 03:13 PM
OnClick with popup - by El Forum - 10-14-2008, 04:39 AM
OnClick with popup - by El Forum - 10-14-2008, 04:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB