Hai All, i am new to cakephp. I configured cakephp with twitter bootstrap
layout for my project work.
When I create a twitter bootstrap alert message in index page, and clicked
close button in alert, alert gets closed. But if i redirected to another
page and created a alert message there, it's not possible to close my alert
from that page.
Can any one help me to solve this problem..
I have attached my sample code also
**model code:**
<?php
class Task extends AppModel
{
var $name = 'Task';
}
?>
**Controller code:**
<?php
class TasksController extends AppController
{
var $name = 'Tasks';
var $components = array('Session');
var $helpers = array('Html', 'Form');
public function beforeFilter() {
parent::beforeFilter();
}
function index()
{
}
function index1()
{
}
}
?>
**View code:(index.ctp)**
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
</head>
<body>
</br>
<?php echo $this->html->link('Click Me', array('action'=>'index1')); ?>
</br>
</br>
</br>
<?php
echo $this->Form->create('Task',array('controller' =>
'Tasks','action'=>'index1'));
echo $this->Form->submit('Click Me',array(' class'=>'btn btn-success ','
name'=>'commit' ,'type'=>'submit' ,'value'=>'Sign in' ));
echo $this->Form->end();
?>
<div class="alert">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>Warning!</strong> Best check yo self, you're not looking too
good.
</div>
<script src="http://code.jquery.com/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>
**Index1.ctp:**
<html>
<head>
<title>Bootstrap 101 Template</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
</head>
<body>
<div class="alert">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>Warning!</strong> Best check yo self, you're not looking too
good.
</div>
<script src="http://code.jquery.com/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>
Please give me suggestions to solve this error.
--
You received this message because you are subscribed to the Google Groups
"twitter-bootstrap" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.