<?php 

//session_start();
include("connection.php")

?>




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Hedgeis-market</title>
<link href="market css.css" rel="stylesheet" type="text/css" />

<link rel="stylesheet" type="text/css" href="jquery-ui.css">
  <script src="jquery-1.8.3.js"></script>
  <script src="jquery-ui.js"></script>
  <link rel="stylesheet" href="/resources/demos/style.css" />
  <!-- <link href="marnet_internal_css.css" rel="stylesheet" type="text/css" /> -->
  <script>
  $(function() {
    $( "#accordion" ).accordion();
  });
  </script>



<script language="javascript" type="text/javascript">
function resizeIframe(obj)
{
obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
 obj.style.width = obj.contentWindow.document.body.scrollWidth + 'px';                       
}
</script>


</head>

<body>


<!--contant start-->
<form method="post">
  <?php include('header2.php');?>
<div class="Contant_wrapper clearfix">
 <div class="topdiv">
        <div class="view">
        <ul>
        <li>View</li>
        <li><a href="#">latest</a></li>
        <li><a href="#">Current Prices</a></li>
        <li> <a href="#">Charts</a></li>
        </ul>
        </div>
    </div>

    <!--contant_left start-->
    <div class="contant_left">

        <a href="market.php">Most Active Today </a>
        <div class="sub_menu">
        </div>
        </div>
     <div id="accordion">


        <?php

 $query1= "SELECT * from `category`";
 $result5 = mysql_query($query1);
   while($row1=mysql_fetch_array($result5))

              {

   $cate_name=$row1['category_name'];
   $cate_id=$row1['category_id'];

  ?> 
<!-- <h3>Section 1</h3> -->

 <h3><a href="category_link_step1.php?cate_id=<?php echo $cate_id?>" class="see">
        <?php echo"$cate_name";?></a></h3>


        <div>
       <?php 
$query1= "SELECT * from `sub_category` where `category_id`='$cate_id'";
$result1 = mysql_query($query1);
while($row2=mysql_fetch_array($result1))

             {

           $sub_name=$row2['subcatogory_name'];
           $sub_id=$row2['sub_id']

  ?> 

 <p><a href="subcategory_link.php?sub_id=<?php echo $sub_id?>" class="show"><?php echo $sub_name;?></a></p>
 <?php }?>
</div>

    <?php }?>

</div>

     </div>

    <!--contant_left end-->

 <!--contant_right start   -->

<div class="contant_right clearfix">
  <div class="field clearfix">
          <?php 

$query1= "SELECT * from `event`";

$result = mysql_query($query1);

     while($row1=mysql_fetch_array($result))
{ 
      $url=$row1['image'];
      $cate_name=$row1['category_id'];
      $sub_name=$row1['sub_id'];
      $des=$row1['event_description'];
      $eve=$row1['event_title'];



  ?>  
      <div class="images">   
        <img src="cat_image/<?php echo $url; ?>" width="90px" height="90px"></div>
        <div class="information"> 
        <h3><a href="prediction1.php"><?php echo "$eve";?></br></a></h3> 
        Event:<a href="prediction1.php"><?php echo "$des";?></a></div>
       <div class="rating">
       </div>
        <?php } ?> 
    </div>


 <div class="field clearfix">
          <?php 

$query1= "SELECT * from `sub_event`";

$result = mysql_query($query1);

     while($row1=mysql_fetch_array($result))
{ 
      $url1=$row1['image'];
      $cate_name1=$row1['category_id'];
      $sub_name1=$row1['sub_id'];
      $sub_name1=$row1['event_id'];
      $des1=$row1['sub_evt_description'];
      $eve1=$row1['sub_evt_title'];



  ?>  
      <div class="images">   
        <img src="subevent/<?php echo $url1; ?>" width="90px" height="90px"></div>
        <div class="information"> 
        <h3><a href="prediction1.php"><?php echo "$des1";?></br></a></h3> 
        Event:<a href="prediction1.php"><?php echo "$eve1";?></a></div>
       <div class="rating">
       </div>
        <?php } ?> 
    </div>

</div>

</div>
</div>
<div style="clear:both"></div>
<?php include('footer1.php');?>
<!--contant end-->

</form>
</body>
</html>

Hii every one

I am getting problem to giving link in accord offollowing page...if imgiving link the acord scriptisnt working ...any other way i can do it plzz suggest.??

<h3><a href="category_link_step1.php?cate_id=<?php echo $cate_id?>" class="see">
<?php echo"$cate_name";?></a></h3>

does it show any errors?

show what html exactly is generated in

<div id="accordion">

(use inpect element to do that)

no it not showing any error i just want to 2 task on one link
1 is showing sub menu
2 is rediredting to iframe.

so you have somewhow to identify.
I don't know that accordion thing.
But what I would try - use jqury selector. On acordiaon click - somehow identiry the 1 - if its 1 then let the acordion to show submenu.

Otherwise if its 2 - maybe e.preventDefault would work so preventing expanding acordion and do other code (redirecty in your case).

So the first thing - you need identify what user wants.
Secodn - you need to stop acordion from expanding.

MAybe acordion plugin has some callback on click or something liek that.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.