help need in javascript
hello
wj friends please help in javascript.
i figured out all problem and got solution but one i can't figure out please help me
the problem is see this link http://www.sajeebgroup.com in this page see right side update news box. a slider is sliding but before one slider another slide is coming why this.
here is slide code
here is php code
please help me
hello
wj friends please help in javascript.
i figured out all problem and got solution but one i can't figure out please help me
the problem is see this link http://www.sajeebgroup.com in this page see right side update news box. a slider is sliding but before one slider another slide is coming why this.
here is slide code
PHP:
(function($) {
$.fn.easySlider = function(options){
// default configuration properties
var defaults = {
prevId: 'prevBtn',
prevText: 'Previous',
nextId: 'nextBtn',
nextText: 'Next',
controlsShow: true,
controlsBefore: '',
controlsAfter: '',
controlsFade: true,
firstId: 'firstBtn',
firstText: 'First',
firstShow: false,
lastId: 'lastBtn',
lastText: 'Last',
lastShow: false,
vertical: false,
speed: 800,
auto: false,
pause: 2000,
continuous: false,
numeric: false,
numericId: 'controls'
};
var options = $.extend(defaults, options);
this.each(function() {
var obj = $(this);
var s = $("li", obj).length;
var w = $("li", obj).width();
var h = $("li", obj).height();
var clickable = true;
obj.width(w);
obj.height(h);
obj.css("overflow","hidden");
var ts = s-1;
var t = 0;
$("ul", obj).css('width',s*w);
if(options.continuous){
$("ul", obj).prepend($("ul li:last-child", obj).clone().css("margin-left","-"+ w +"px"));
$("ul", obj).append($("ul li:nth-child(2)", obj).clone());
$("ul", obj).css('width',(s+1)*w);
};
if(!options.vertical) $("li", obj).css('float','left');
if(options.controlsShow){
var html = options.controlsBefore;
if(options.numeric){
html += '<ol id="'+ options.numericId +'"></ol>';
} else {
if(options.firstShow) html += '<span id="'+ options.firstId +'"><a href=\"javascript:void(0);\">'+ options.firstText +'</a></span>';
html += ' <span id="'+ options.prevId +'"><a href=\"javascript:void(0);\">'+ options.prevText +'</a></span>';
html += ' <span id="'+ options.nextId +'"><a href=\"javascript:void(0);\">'+ options.nextText +'</a></span>';
if(options.lastShow) html += ' <span id="'+ options.lastId +'"><a href=\"javascript:void(0);\">'+ options.lastText +'</a></span>';
};
html += options.controlsAfter;
$(obj).after(html);
};
if(options.numeric){
for(var i=0;i<s;i++){
$(document.createElement("li"))
.attr('id',options.numericId + (i+1))
.html('<a rel='+ i +' href=\"javascript:void(0);\">'+ (i+1) +'</a>')
.appendTo($("#"+ options.numericId))
.click(function(){
animate($("a",$(this)).attr('rel'),true);
});
};
} else {
$("a","#"+options.nextId).click(function(){
animate("next",true);
});
$("a","#"+options.prevId).click(function(){
animate("prev",true);
});
$("a","#"+options.firstId).click(function(){
animate("first",true);
});
$("a","#"+options.lastId).click(function(){
animate("last",true);
});
};
function setCurrent(i){
i = parseInt(i)+1;
$("li", "#" + options.numericId).removeClass("current");
$("li#" + options.numericId + i).addClass("current");
};
function adjust(){
if(t>ts) t=0;
if(t<0) t=ts;
if(!options.vertical) {
$("ul",obj).css("margin-left",(t*w*-1));
} else {
$("ul",obj).css("margin-left",(t*h*-1));
}
clickable = true;
if(options.numeric) setCurrent(t);
};
function animate(dir,clicked){
if (clickable){
clickable = false;
var ot = t;
switch(dir){
case "next":
t = (ot>=ts) ? (options.continuous ? t+1 : ts) : t+1;
break;
case "prev":
t = (t<=0) ? (options.continuous ? t-1 : 0) : t-1;
break;
case "first":
t = 0;
break;
case "last":
t = ts;
break;
default:
t = dir;
break;
};
var diff = Math.abs(ot-t);
var speed = diff*options.speed;
if(!options.vertical) {
p = (t*w*-1);
$("ul",obj).animate(
{ marginLeft: p },
{ queue:false, duration:speed, complete:adjust }
);
} else {
p = (t*h*-1);
$("ul",obj).animate(
{ marginTop: p },
{ queue:false, duration:speed, complete:adjust }
);
};
if(!options.continuous && options.controlsFade){
if(t==ts){
$("a","#"+options.nextId).hide();
$("a","#"+options.lastId).hide();
} else {
$("a","#"+options.nextId).show();
$("a","#"+options.lastId).show();
};
if(t==0){
$("a","#"+options.prevId).hide();
$("a","#"+options.firstId).hide();
} else {
$("a","#"+options.prevId).show();
$("a","#"+options.firstId).show();
};
};
if(clicked) clearTimeout(timeout);
if(options.auto && dir=="next" && !clicked){;
timeout = setTimeout(function(){
animate("next",false);
},diff*options.speed+options.pause);
};
};
};
// init
var timeout;
if(options.auto){;
timeout = setTimeout(function(){
animate("next",false);
},options.pause);
};
if(options.numeric) setCurrent(0);
if(!options.continuous && options.controlsFade){
$("a","#"+options.prevId).hide();
$("a","#"+options.firstId).hide();
};
});
};
})(jQuery);
here is php code
PHP:
<?php
include 'news/common/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>Welcome to Sajeeb Group</title>
<script type="text/javascript" src="swfobject.js"></script>
<style type="text/css">
#ticker-container {
position:relative;
/*overflow:hidden;*/
width: 190px;
height: 200px;
padding-top:0px;
color:#000000;
margin-top:0px;
margin-bottom:1px;
}
#ticker {
position:relative;
overflow:hidden;
margin-left:50px;
margin-right:20px;
margin-top:25px;
width:155px;
padding:0px;
}
</style>
<script type="text/javascript" src="swfobject.js"></script>
<style type="text/css">
<!--
.gallery { zoom:1;
width:520px;
}
-->
</style>
<script type="text/javascript">var LightBoxOpt={autoPlay:false}</script>
<link rel="stylesheet" href="engine/css/lightbox.css" type="text/css" media="screen" />
<script src="engine/js/prototype.js" type="text/javascript"></script>
<script src="engine/js/scriptaculous.js?load=effects,builder" type="text/javascript"></script>
<script src="engine/js/lightbox.js" type="text/javascript"></script>
<style>
.gallery {
zoom:1;
width:700px;
}
.gallery a {
display: block ;
float:center;
margin:5px;
padding:5px;
height: 150px;
border:solid 1px #b8b8b8;
background-color:#FFFFFF;
opacity:0.87;
alignment: center;
}
.gallery a:hover {
opacity:1;
}
.gallery a img {
border:none;
display:block;
}
.gallery a#vlightbox{display:none}
.gallery1 { zoom:1;
width:520px;
}
.gallery2 { zoom:1;
width:520px;
}
.gallery3 { zoom:1;
width:520px;
}
.gallery4 { zoom:1;
width:520px;
}
.gallery5 { zoom:1;
width:520px;
}
.gallery6 { zoom:1;
width:520px;
}
.gallery7 { zoom:1;
width:520px;
}
.gallery8 { zoom:1;
width:520px;
}
.gallery9 { zoom:1;
width:520px;
}
.gallery10 { zoom:1;
width:520px;
text-align:center;
}
.style1 {font-family: Arial, Helvetica, sans-serif}
.style3 {font-size: 12px}
.gallery11 { zoom:1;
width:520px;
}
.gallery12 { zoom:1;
width:520px;
}
.gallery13 { zoom:1;
width:520px;
}
.gallery14 { zoom:1;
width:520px;
}
.gallery15 {zoom:1;
width:520px;
}
.gallery15 { zoom:1;
width:700px;
}
.gallery111 {zoom:1;
}
.gallery121 {zoom:1;
}
.gallery131 {zoom:1;
}
.gallery1111 {zoom:1;
}
.gallery1311 {zoom:1;
}
.gallery13111 {zoom:1;
}
#link_style { text-decoration:none; color:#000000;}
</style>
<!--fade slide-->
<!-- SLIDER START -->
<script type="text/javascript" src="robin/easyslider/js/jquery.js"></script>
<script type="text/javascript" src="robin/easyslider/js/easySlider.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#ticker").easySlider({
auto: true,
continuous: true
});
});
</script>
<link href="robin/easyslider/css/screen.css" rel="stylesheet" type="text/css" media="screen" />
<SCRIPT TYPE="text/javascript">
function addEvent(elm, evType, fn, useCapture){if(elm.addEventListener){elm.addEventListener(evType, fn, useCapture);return true;}else if (elm.attachEvent){var r = elm.attachEvent('on' + evType, fn);return r;}else{elm['on' + evType] = fn;}}
var newWindow = null;
function closeWin(){
if (newWindow != null){
if(!newWindow.closed)
newWindow.close();
}
}
function popUpWin(url, type, strWidth, strHeight){
closeWin();
type = type.toLowerCase();
if (type == "fullscreen"){
strWidth = screen.availWidth;
strHeight = screen.availHeight;
}
var tools="";
if (type == "standard") tools = "resizable,toolbar=yes,location=yes,scrollbars=yes,menubar=yes,width="+strWidth+",height="+strHeight+",top=0,left=0";
if (type == "console" || type == "fullscreen") tools = "resizable,toolbar=no,location=no,scrollbars=no,width="+strWidth+",height="+strHeight+",left=0,top=0";
newWindow = window.open(url, "newWin", tools);
newWindow.focus();
}
function doPopUp(e)
{
//set defaults - if nothing in rel attrib, these will be used
var t = "standard";
var w = "500";
var h = "400";
//look for parameters
attribs = this.rel.split(" ");
if (attribs[1]!=null) {t = attribs[1];}
if (attribs[2]!=null) {w = attribs[2];}
if (attribs[3]!=null) {h = attribs[3];}
//call the popup script
popUpWin(this.href,t,w,h);
//cancel the default link action if pop-up activated
if (window.event)
{
window.event.returnValue = false;
window.event.cancelBubble = true;
}
else if (e)
{
e.stopPropagation();
e.preventDefault();
}
}
function findPopUps()
{
var popups = document.getElementsByTagName("a");
for (i=0;i<popups.length;i++)
{
if (popups[i].rel.indexOf("popup")!=-1)
{
// attach popup behaviour
popups[i].onclick = doPopUp;
// add popup indicator
if (popups[i].rel.indexOf("noicon")==-1)
{
popups[i].style.backgroundImage = "url(pop-up.gif)";
popups[i].style.backgroundPosition = "0 center";
popups[i].style.backgroundRepeat = "no-repeat";
popups[i].style.paddingLeft = "15px";
}
// add info to title attribute to alert fact that it's a pop-up window
popups[i].title = popups[i].title + " [Opens in pop-up window]";
}
}
}
addEvent(window, "load", findPopUps, false);
</SCRIPT>
<script language="JavaScript" type="text/JavaScript">
<!--
//Made by 1st JavaScript Editor
//http://www.yaldex.com
//Come and get more (free) products
var neww;
function azxfds(axzfds,axcfds,acxfds)
{neww=window.open(axzfds,axcfds,acxfds);
neww.window.focus();
}
//-->
</script>
<!-- SLIDER END -->
</head>
<body background="images/wr_body.gif" onLoad="MM_preloadImages('images/btn%20division%20over.gif','images/btn%20about%20over.gif','images/btn%20products%20over.gif','images/btn%20import%20over.gif','images/btn%20contact%20over.gif','images/btn%20home%20over.gif','images/btn%20link4%20over.gif')">
<div align="center">
<table cellpadding="0" cellspacing="0" width="775" height="107">
<!-- MSTableType="layout" -->
<tr>
<td valign="top" width="258">
<img border="0" src="images/head logo.gif" width="258" height="107"></td>
<td valign="top" height="107" width="517">
<img border="0" src="images/head right.gif" width="517" height="107"></td>
</tr>
</table>
</div>
<div align="center">
<table cellpadding="0" cellspacing="0" width="775" height="798">
<!-- MSTableType="layout" -->
<tr>
<td width="775" height="798" valign="top">
<div id="FlashMenuLabs">
You need to upgrade your Flash Player or to allow javascript to enable Website menu.</br>
<a href="http://www.adobe.com/go/getflashplayer">Get Flash Player</a>
</div>
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("menu.swf", "menu", "774", "35", "8", "#000000");
so.addParam("wmode", "transparent");
so.addParam("scale", "noscale");
so.addParam("salign", "TL");
so.write("FlashMenuLabs");
// ]]>
</script>
<table cellpadding="0" cellspacing="0" width="775" height="223">
<!-- MSTableType="layout" -->
<tr>
<td width="775" height="223" valign="top">
<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="774" height="223">
<param name="movie" value="body anim.swf">
<param name="quality" value="High">
<embed src="body%20anim.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" width="774" height="223"></object>
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" width="775" height="232" id="table1">
<!-- MSTableType="layout" -->
<tr>
<td valign="bottom" background="images/welcome%20bg.gif">
<div align="right">
<table cellpadding="0" cellspacing="0" width="370" height="180">
<!-- MSTableType="layout" -->
<tr>
<td background="images/welcome%20text%20bg.gif" height="180" width="370">
<div align="center">
<table cellpadding="0" cellspacing="0" width="346" height="159">
<!-- MSTableType="layout" -->
<tr>
<td width="346" height="159" valign="top" style="text-align:justify;">
<font face="Verdana" size="2" color="#203E59">
Sajeeb Group of Companies is one of the well reputed and leading manufacturing, exporting, importing and marketing organization in Bangladesh. Since its inception in 1982, Sajeeb Group has grown up in Stature and became one of the largest business conglomerates in Bangladesh. This organization is the pioneer in the context of largest Food processing and leading the business in Food and Instant Powder Drinks Products in Bangladesh.
</font></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
</td>
<td></td>
<td valign="top" background="images/news%20bg.gif">
<div id="ticker-container">
<div id="ticker">
<ul>
<?php
//include("../../index.php");
// error_reporting(E_ALL);
include("robin/notice/config.php");
$query = "SELECT id, title,body,name FROM notice";
$result = mysql_query($query);
$num = mysql_num_rows($result);
while ($row = mysql_fetch_assoc($result))
{ $name = $row['name'];
echo '<li><a href="robin/notice/fullarticle.php?id='.$row["id"].'" rel="popup standard 700 600 noicon"><img src="kcfinder/upload/.thumbs/images/'.$name.'" width="150px" height="150px" /></a></li>';
}
?>
</ul>
</div>
</div>
</div>
</div>
</td>
</tr>
<tr>
<td width="563"></td>
<td width="3"></td>
<td height="2" width="209"></td>
</tr>
</table>
</div>
<div align="center">
<table cellpadding="0" cellspacing="0" width="775" height="230" id="table2">
<!-- MSTableType="layout" -->
<tr>
<td valign="top" background="images/divisions-bg.gif" rowspan="2" width="563">
<div align="center">
<table cellpadding="0" cellspacing="0" width="549" height="169" style="text-align:left;">
<!-- MSTableType="layout" -->
<tr >
<td valign="top" height="32" colspan="2">
<p style="margin-left: 10px; margin-top: 10px"><b>
<font size="2" face="Verdana" color="#203E59">Group
Capability</font></b></td>
</tr>
<tr>
<td height="137" width="279" valign="top">
<ul>
<li>
<p style="margin-top: 6px; margin-bottom: 3px">
<font face="Verdana" size="2" color="#203E59">
<span class="gallery1111"><a href="homepage/sajeeb-group.jpg" rel="lightbox[sample]" style="text-decoration:none; color:#203E59;">Sajeeb Corporation</a></span></font>
</li>
<li>
<p style="margin-top: 6px; margin-bottom: 3px">
<font face="Verdana" size="2" color="#203E59">
<span class="gallery1111"><a href="homepage/sajib-agro.jpg" rel="lightbox[sample]" style="text-decoration:none; color:#203E59;" >Sajeeb Agro Limited</a></span></font>
</li>
<li>
<p style="margin-top: 6px; margin-bottom: 3px">
<font face="Verdana" size="2" color="#203E59">
<a href="http://www.ststelecomltd.com/" style="text-decoration: none">
<font color="#203E59">STS Telecom Limited</font></a></font></li>
<li>
<p style="margin-top: 6px; margin-bottom: 3px">
<font face="Verdana" size="2" color="#203E59">
<span class="gallery1111"><a href="homepage/hashem-auto.jpg" rel="lightbox[sample]" style="text-decoration:none; color:#203E59;">Hashem Auto Rice Mill</a></span></font></li>
<li>
<p style="margin-top: 6px; margin-bottom: 3px">
<font face="Verdana" size="2" color="#203E59">
<span class="gallery1111"><a href="homepage/chittagong-enamel.jpg" rel="lightbox[sample]" style="text-decoration:none; color:#203E59;">Chittagong Enamel & Aluminium Works Ltd.</a></span></font></li>
<li>
<p style="margin-top: 6px; margin-bottom: 3px">
<font face="Verdana" size="2" color="#203E59">
<span class="gallery1111"><a href="homepage/sajeeb-industries.jpg" rel="lightbox[sample]" style="text-decoration:none; color:#203E59;">Sajeeb Industrial Corporation</a></span></font></li>
</ul>
</td>
<td height="137" width="270" valign="top">
<ul>
<li>
<p style="margin-top: 6px; margin-bottom: 2px">
<font size="2" face="Verdana" color="#203E59">
<span class="gallery1111"><a href="homepage/Hasem-foods.jpg" rel="lightbox[sample]" style="text-decoration:none; color:#203E59;">Hashem Foods Limited</a></span></font></li>
<li>
<p style="margin-top: 6px; margin-bottom: 2px">
<font size="2" face="Verdana" color="#203E59">
<span class="gallery1111"><a href="homepage/sajib-home.jpg" rel="lightbox[sample]" style="text-decoration:none; color:#203E59;">Sajeeb Homes Limited</a></span></font></li>
<li>
<p style="margin-top: 6px; margin-bottom: 2px">
<font size="2" face="Verdana" color="#203E59">
<span class="gallery1111"><a href="homepage/mermaid.jpg" rel="lightbox[sample]" style="text-decoration:none; color:#203E59;">Mermaid Sweater Ltd.</a></span></font></li>
<li>
<p style="margin-top: 6px; margin-bottom: 2px">
<font size="2" face="Verdana" color="#203E59">
<a href="http://www.takaful.com.bd/" style="text-decoration: none">
<font color="#203E59">Takaful Islami Insurance
Limited </font></a></font></li>
<li>
<p style="margin-top: 6px; margin-bottom: 2px">
<font size="2" face="Verdana" color="#203E59"><a href="http://www.ststelecomltd.com/" style="text-decoration: none" target="_self"><font color="#203E59">STS
Telecommunications (M) Sdn Bhd</font></a></font></li>
<li>
<p style="margin-top: 6px; margin-bottom: 2px">
<font size="2" face="Verdana" color="#203E59"><a href="http://www.ststelecomltd.com/" style="text-decoration: none" target="_self"><font color="#203E59">
Meghna Insurance Company Ltd.
</font></a></font></li>
</ul>
</td>
</tr>
</table>
</div>
</td>
<td></td>
<td valign="middle" height="115" background="images/message%20bg.gif">
<div align="right">
<table cellpadding="0" cellspacing="0" width="180" height="99">
<!-- MSTableType="layout" -->
<tr>
<td width="180" height="99" valign="middle">
<p align="justify" style="margin-left: 5px; margin-right: 8px">
<font size="1" face="Verdana" color="#203E59">Welcome
you all in the world of ?Sajeeb group of Companies? to
get the taste of modernization and continuous
improvement in the business arena of Bangladesh. (<a href="message.php"><font color="#224562">Read
More>></font></a>)</font></td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td width="3">
<p style="margin-top: 2px; margin-bottom: 2px"></td>
<td valign="bottom" height="115" background="images/webmail%20bg.gif" width="209">
<div align="right">
<table cellpadding="0" cellspacing="0" width="180" height="100">
<!-- MSTableType="layout" -->
<tr>
<td width="180" height="100" valign="middle">
<form method="POST" action="http://sajeebgroup.com:2096/login/" style="text-align:right; padding-right:4px;">
<!--webbot bot="SaveResults" U-File="fpweb:///_private/form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
<p style="margin-left: 5px; margin-right: 3px; margin-top: 2px; margin-bottom: 2px">
<b><font face="Verdana" size="1" color="#203E59">
Email : </font></b>
<font color="#203E59">
<input name="user" type="text" id="user" size="12">
</font></p>
<p style="margin-left: 5px; margin-right: 3px; margin-top: 2px; margin-bottom: 2px">
<b><font face="Verdana" size="1">
<font color="#203E59">Password:</font> </font></b>
<input name="pass" type="password" id="pass" size="12">
<input type="submit" value="Login" name="B1" style="margin-top:2px;">
</p>
</form>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
<table cellpadding="0" cellspacing="0" width="775" height="90">
<!-- MSTableType="layout" -->
<tr>
<td width="775" height="90" valign="middle">
<table cellpadding="0" cellspacing="0" width="775" height="79">
<!-- MSTableType="layout" -->
<tr>
<td background="images/bottom%20bg%20home.gif" valign="bottom" height="79" width="775">
<table cellpadding="0" cellspacing="0" width="775" height="75">
<!-- MSTableType="layout" -->
<tr>
<td width="775" height="45" valign="top">
<p align="center" style="margin-top: 3px; margin-bottom: 3px"><font color="#224562" face="Verdana" size="2">Copyright © 2009, Sajeeb Group. All rights reserved</font></p>
<p align="center" style="margin-top: 3px; margin-bottom: 3px">
<font face="Verdana" size="1" color="#B9C0C6">Solution
Provided by:
<a href="http://www.igraphicsbd.com/" style="text-decoration: none">
<font color="#B9C0C6">Imagine Graphics</font></a></font></td>
</tr>
<tr>
<td width="775" height="30" align="center"><!-- Start of SimpleHitCounter Code -->
<div align="center"><a href="#" target="_blank"><img src="http://simplehitcounter.com/hit.asp?uid=486795&f=16777215&b=16711680" border="0" height="18" width="83" alt="free hit counters"></a><br><a href="http://www.simplehitcounter.com" target="_blank"></a></div>
<!-- End of SimpleHitCounter Code -->
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</tr>
</body>
</html>
please help me
Last edited: