?
Solved

How can I call thickbox inside flexigrid ?

Posted on 2011-10-11
5
Medium Priority
?
429 Views
Last Modified: 2012-10-08
I have developed list using flexigrid with code igniter, thickbox. On the flexigrid anchor , If I call style class or rel it does not work. I like to call some modal popup to show details instead of navigate next page .. I call like this,

<a href="'.base_url().'/test/get_rate_info/'.$row->rat_id.'?&keepThis=true&TB_iframe=true&height=133&width=490" title="Modify" class="thickbox" >

but it does not work.

This code works if I call out side of flexigrid as just anchor ..

How can I fix this issue?
0
Comment
Question by:Loganathan Natarajan
  • 4
5 Comments
 
LVL 83

Expert Comment

by:leakim971
ID: 36955345
where's the code?
0
 
LVL 36

Author Comment

by:Loganathan Natarajan
ID: 36955469
everything works fine except the linking on the thick box anchor on flexigrid
function index() 
	{
		//List of all fields that can be sortable. This is Optional.
		//This prevents that a user sorts by a column that we dont want him to access, or that doesnt exist, preventing errors.
		$valid_fields = array('loc_id','loc_code','loc_name');
		
		$this->flexigrid->validate_post('loc_id','desc',$valid_fields);

		$records = $this->location_model->location_getall();
		
		$this->output->set_header($this->config->item('json_header'));
		
		
		
		/*
		 * Json build WITH json_encode. If you do not have this function please read
		 * http://flexigrid.eyeviewdesign.com/index.php/flexigrid/example#s3 to know how to use the alternative
		 */
		foreach ($records['records']->result() as $row)
		{
			$record_items[] = array(
			$row->loc_id,
			$row->loc_id,
			$row->loc_code,
			$row->loc_name,
			'
			<a href="'.base_url().'common/location/get_loc_info/'.$row->loc_id.'?&keepThis=true&TB_iframe=true&height=133&width=490" title="Modify" class="thickbox" ><img width="15" height="16" border=\'0\' src=\''.$this->config->item('base_url').'/images/edit.png\'></a>&nbsp;&nbsp;
			<a href=\''.$this->config->item('base_url').'common/location/delete/'.$row->loc_id.'\' title="Delete" OnClick=\'Javascript:if(confirm("Do you really want to delete?")) return true; else return false;\' ><img width="15" height="16" border=\'0\' src=\''.$this->config->item('base_url').'/images/delete.png\'></a>'
			);
		}
		//Print please
		//$this->output->set_output($this->flexigrid->json_build($records['record_count'],$record_items));
				
		//Print please
		if (isset($record_items))
			 $this->output->set_output($this->flexigrid->json_build($records['record_count'],$record_items));
		else
			 $this->output->set_output('{"page":"1","total":"0","rows":[]}');

	}

Open in new window

0
 
LVL 36

Author Comment

by:Loganathan Natarajan
ID: 36955474
Look at these lines,

<a href="'.base_url().'common/location/get_loc_info/'.$row->loc_id.'?&keepThis=true&TB_iframe=true&height=133&width=490" title="Modify" class="thickbox" ><img width="15" height="16" border=\'0\' src=\''.$this->config->item('base_url').'/images/edit.png\'></a>&nbsp;&nbsp;
                        <a href=\''.$this->config->item('base_url').'common/location/delete/'.$row->loc_id.'\' title="Delete" OnClick=\'Javascript:if(confirm("Do you really want to delete?")) return true; else return false;\' ><img width="15" height="16" border=\'0\' src=\''.$this->config->item('base_url').'/images/delete.png\'></a>'

Open in new window

0
 
LVL 36

Accepted Solution

by:
Loganathan Natarajan earned 0 total points
ID: 36955475
but this works fine where without flexgrid,

<div id="sub_nav">
	<ul>
	  <li><a href="<?php echo base_url();?>common/location/" title="List Location">List</a></li>
	  <li>
	  <a href="<?php echo base_url();?>common/location/add?&keepThis=true&TB_iframe=true&height=133&width=490" title="Add Location" class="thickbox">Add</a></li>
	 
	</ul>
</div>

Open in new window

0
 
LVL 36

Author Closing Comment

by:Loganathan Natarajan
ID: 38472862
I decided this as solution for time-being. I am ok with this.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
It’s a season to be thankful, and we’re thankful for users like you who engage on site, solve technology problems, and network with others in the industry. What tech are we most thankful for? Keep reading.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses
Course of the Month15 days, 8 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question