• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to link to form?

#1
[eluser]redlogic[/eluser]
First off I just wanted to say how great CI is, I'm only two days in and it's saved me masses of time already.

However I've got a a little stuck on dynamically loading content. This is the link in my menu:
Code:
<li><a title="Clients" href="[removed]ajaxpage('&lt;?php echo site_url('site_add_client');?&gt;','contentarea');">Client</a></li>

Which should open a form in a div with id contentarea. I've tried hardcoding the link to the form controller http://localhost/mm/index.php/site_add_client/ and that doesn't work either, however it will open a direct link to the form view (albeit with fopen errors, as it's not being processed by CI I guess?) so I think the javascript is working fine.

I think it's just a linking issue that I'm not understanding. Any ideas? All help gratefully received.

p.s The forum seems to have edited my code, the [removed] part is 'javascript' followed by a colon.

#2
[eluser]redlogic[/eluser]
Think I phrased that question badly.

I'd like to be able to add java-script to an anchor() so the resulting html would render as:

Code:
<li><a title="Clients" href="[removed]ajaxpage('site_add_client','contentarea');">Client</a></li>

again [removed] = java-script: (without the hyphen)


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.