• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
having issues with Error Number: 1064

#6
At best, that link is just going to do whatever your load_content() function tells it to do in your JavaScript.

You would be better off creating a form with
Code:
<?php form_open(site_url('article/add')); ?>
(or the equivalent form element with method='post') and a submit button in the form. If you want to send the post via AJAX, you can override the submit button to do so in the script after you get the form working.

It's always best to take these things one step at a time. If the form works, you'll know that your HTML/view, controller, and model are working. Once that's done, you add JavaScript to change the button/form behavior to do the same thing via AJAX, and you shouldn't have to troubleshoot anything other than the script (as long as you leave everything else alone). Further, you gain the benefit of the form continuing to work if someone disables the script.
Reply


Messages In This Thread
RE: having issues with Error Number: 1064 - by mwhitney - 06-10-2015, 09:25 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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