کمک کنید طراحی این نوع کادر ها

Goroop.ir

Member
دوست عزیز شما میتوانید سورس کد از همون سایت کپی کنید
فقط کافیله کلیک راست کنید و بر روی گزینه ی View source کلیک کنید . بعد در میان کد ها بگرد دنبال کد مورد نظرت
 

SUSU.MYLOVE

New Member
دوست گرامی من نیز خودم این کار رو میدونستم ولی اینجا مطرح کردم تا که این کد رو با توضیحات کامل از دوستان درخواست کنم.
بعلاوه من با این کار حق کپی رایت اون دوستان رو نقض میکنم و من هم چنین کاری رو دوست ندارم
با تشکر اگر کسی تونست کمک کنه ممنون میشم
 

iran480

Member
دوست عزیز استفاده از این کدهای جاوااسکریپت نقض کپی رایت نیست. این کدها آزاد هستن و توی اینترنت همه استفاده می کنن. این سایت هم به احتمال زیاد خودش از جایی برداشته.
 

SUSU.MYLOVE

New Member
iran480 جان ممنون برای راهنمایی که کردید
خوب حالا من کجای این کد ها رو بردارم و به چه صورد وارد صفحه مورد نظر خودم بکنم
ممنون میشم که به صورت کامل کمکم کنید.
 

iran480

Member
ابتدا کد زیر رو قبل از تگ </head> وارد کنید
کد:
<script language="JavaScript1.2">

// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this header

isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isHot=false;

function ddInit(e){
  topDog=isIE ? "BODY" : "HTML";
  whichDog=isIE ? document.all.theLayer : document.getElementById("theLayer");  
  hotDog=isIE ? event.srcElement : e.target;  
  while (hotDog.id!="titleBar"&&hotDog.tagName!=topDog){
    hotDog=isIE ? hotDog.parentElement : hotDog.parentNode;
  }  
  if (hotDog.id=="titleBar"){
    offsetx=isIE ? event.clientX : e.clientX;
    offsety=isIE ? event.clientY : e.clientY;
    nowX=parseInt(whichDog.style.left);
    nowY=parseInt(whichDog.style.top);
    ddEnabled=true;
    document.onmousemove=dd;
  }
}

function dd(e){
  if (!ddEnabled) return;
  whichDog.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx; 
  whichDog.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
  return false;  
}

function ddN4(whatDog){
  if (!isN4) return;
  N4=eval(whatDog);
  N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
  N4.onmousedown=function(e){
    N4.captureEvents(Event.MOUSEMOVE);
    N4x=e.x;
    N4y=e.y;
  }
  N4.onmousemove=function(e){
    if (isHot){
      N4.moveBy(e.x-N4x,e.y-N4y);
      return false;
    }
  }
  N4.onmouseup=function(){
    N4.releaseEvents(Event.MOUSEMOVE);
  }
}

function hideMe(){
  if (isIE||isNN) whichDog.style.visibility="hidden";
  else if (isN4) document.theLayer.visibility="hide";
}

function showMe(){
  if (isIE||isNN) whichDog.style.visibility="visible";
  else if (isN4) document.theLayer.visibility="show";
}

document.onmousedown=ddInit;
document.onmouseup=Function("ddEnabled=false");

</script>
و این کد رو بعد از تگ <body> وارد کنید
کد:
<div id="theLayer" style="border:1px solid #005599; position:absolute;width:350px;height:400px;left:290px;top:400px;visibility:visible; background-color:#ffffff" align="right" dir="rtl">
<table border="0" width="100%" cellspacing="0" cellpadding="0" style="font-family: Tahoma; font-size: 9pt" height="100%">
    <tr>
        <td height="14">
<a href="#" onClick="hideMe();return false">&nbsp;<b>x بستن اين پنجره</b></a></td>
    </tr>
    <tr>
        <td align="center" height="86">

        <img border="0" src="http://danlod.net/images/click.gif" width="125" height="70"><br>
        <a href="http://danlod.net/">
        <img border="0" src="http://danlod.net/images/danlod-logo.gif" width="117" height="144"></a><br>
        <font color="#FF9900"><b>جديدترين محصولات نرم افزاري در فروشگاه اينترنتي 
        دانلود</b></font></td>
    </tr>
    <tr>
        <td align="right" style="padding-right: 5px">
        <img border="0" src="http://danlod.net/images/arrow5.gif" width="8" height="10" hspace="8"><a target="_blank" href="http://products.danlod.net/2007/08/000140.php">فتوشاپ 
        CS3 Me (پشتيباني از فارسي)</a></td>

    </tr>
    <tr>
        <td align="right" style="padding-right: 5px">
        <img border="0" src="http://danlod.net/images/arrow5.gif" width="8" height="10" hspace="8"><a target="_blank" href="http://products.danlod.net/2007/07/000137.php">تمامی 
        نرم افزارهای گرافیکی، میکس و مونتاژ ، ساخت فیلم و طراحی وب سایت کمپانی 
        Adobe</a></td>
    </tr>
    <tr>
        <td align="right" style="padding-right: 5px">
        <img border="0" src="http://danlod.net/images/arrow5.gif" width="8" height="10" hspace="8"><a target="_blank" href="http://products.danlod.net/2007/06/000133.php">نرم 
        افزارهاي نورتون 2007</a></td>

    </tr>
    <tr>
        <td align="right" style="padding-right: 5px">
        <img border="0" src="http://danlod.net/images/arrow5.gif" width="8" height="10" hspace="8"><a target="_blank" href="http://products.danlod.net/2007/06/000128.php">ویندوز 
        مدیا سنتر 2005 (ویندوز هزاره سوم)</a></td>
    </tr>
    <tr>
        <td align="right" style="padding-right: 5px">
        <img border="0" src="http://danlod.net/images/arrow5.gif" width="8" height="10" hspace="8"><a target="_blank" href="http://products.danlod.net/2007/05/000069.php">قدرتمندترين 
        نرم افزار آموزش 29 زبان دنيا</a></td>

    </tr>
    <tr>
        <td align="right" style="padding-right: 5px">
        <img border="0" src="http://danlod.net/images/arrow5.gif" width="8" height="10" hspace="8"><a target="_blank" href="http://products.danlod.net/2007/06/000125.php">بهترين 
        هاي نوکيا 2007</a></td>
    </tr>
</table>
</div>
 

SUSU.MYLOVE

New Member
iran450 جان با کمال تشکر دوباره از شما
این کدهایی که شما قرار دادید مربوط به پنجره ای هستش که در کادر وسط قرار داره،من کد کادر کوچک و رونده ای رو که کنار پنجره و در سمت بالا قرار دارد رو میخوام.یا در سایت pixel.ir که نوشتم علامت + پایین صفحه رو من منظور دارم
 
فکر کنم این کد باشه :

کد:
<div id="layer1" style="position:absolute; left:51px; visibility:show; top:21px; width:133px">
<table border="0" width="192" cellspacing="0" cellpadding="0" height="133">
	<tr>
		<td colspan="3" style="padding: 0" align="right" dir="rtl">
		<a href="javascript:hideIt()" style="text-decoration: none">
		<font face="Tahoma" style="font-size: 9pt; font-weight:700">x بستن</font></a></td>
	</tr>
	<tr>
		<td colspan="3" style="padding: 0">
		<img border="0" src="http://danlod.com/fasite/frame-slices/up-1_01.gif" width="192" height="5"></td>
	</tr>
	<tr>
		<td style="padding: 0" rowspan="2">
		<p dir="ltr">
		<img border="0" src="http://danlod.com/fasite/frame-slices/up-1_02.gif" width="54" height="128"></td>
		<td style="padding: 0" width="125" height="123">
		<a href="#" onClick="window.open(url,'BannerWin');">
<img src="http://danlod.com/fasite/banners/product-ads9.jpg" width=125 height=123 border=0 name="banner"></a></td>
		<td style="padding: 0" rowspan="2">
		<img border="0" src="http://danlod.com/fasite/frame-slices/up-1_04.gif" width="13" height="128"></td>
	</tr>
	<tr>
		<td style="padding: 0">
		<img border="0" src="http://danlod.com/fasite/frame-slices/up-1_05.gif" width="125" height="5"></td>
	</tr>
</table>
</div>
 

SUSU.MYLOVE

New Member
hooligan.boy جان این کد تقریبا درسته ولی چند مشکل داره.
1.این کادر با پایین اومدن یا بالا رفتن اون هیچ حرکتی نمی کنه
2.کاملا لود نمیشه
فکر کنم که سایت DANLOD.COM رو بیخیال شیم بریم روی لینک بعدی مال سایت PIXEL.IR اون در مورد چیزی که من میخوام خیلی بی نقص هستش.
 

جدیدترین ارسال ها

بالا