Difference between revisions of "6CS028 Workshop - Ajax"

From mi-linux
Jump to navigationJump to search
Line 5: Line 5:
 
* Step 1 – Create the data controller/view
 
* Step 1 – Create the data controller/view
 
* Step 2 – Create the web page controller/view
 
* Step 2 – Create the web page controller/view
 +
 +
== Include jQuery ==
 +
 +
Please note that we will be using the jQuery library, so you need to include it in your <head> section. You can do this by adding the line in bold to your templates/header.php file:
 +
 +
<pre>
 +
<html>
 +
<head>
 +
  <title><?php echo $title ?> - CodeIgniter 2 Tutorial</title>
 +
  '''<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>'''
 +
</head>
 +
<body>
 +
<h1>CodeIgniter 2 Tutorial</h1>
 +
</pre>
  
 
== Step 1 – Create the data controller/view ==
 
== Step 1 – Create the data controller/view ==
  
 
== Step 2 – Create the web page controller/view ==
 
== Step 2 – Create the web page controller/view ==

Revision as of 11:30, 4 March 2014

Main Page >> Advanced Web Technologies >> Workbook >> Week 06

Today we are going to use Ajax to create a simple jQuery Live Search in Code Igniter:

  • Step 1 – Create the data controller/view
  • Step 2 – Create the web page controller/view

Include jQuery

Please note that we will be using the jQuery library, so you need to include it in your <head> section. You can do this by adding the line in bold to your templates/header.php file:

<html>
<head>
   <title><?php echo $title ?> - CodeIgniter 2 Tutorial</title>
   '''<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>'''
</head>
<body>
	<h1>CodeIgniter 2 Tutorial</h1>

Step 1 – Create the data controller/view

Step 2 – Create the web page controller/view