عدسة مكبرة للموقع

كل ما يهم مطور المواقع ... لغات برمجة المواقع .. سكربتات .. مناقشات ..
مغلق
حياة
عضو نشيط
مشاركات: 168
اشترك في: 11 أغسطس 2005, 15:23

عدسة مكبرة للموقع

مشاركة بواسطة حياة »

فكرة رائعة:
http://www.gulfinthemedia.com/index.php ... p&lang=en&

يوجد في الأعلى عدسة مكبرة يمكن من خلالها تكبير الصفحة بكل محتوياتها بما فيها الصور.

ما هو السكربت المستخدم؟

شكرا.
عبقر
عضو مفيد جداً
مشاركات: 417
اشترك في: 25 سبتمبر 2004, 03:28
مكان: MyPC

مشاركة بواسطة عبقر »

اختي اي شي يعجبك في موقع انصحك حاولي مطالعة مصدر الصفحة وشويه بحث فيها راح تجدين المطلوب

للاسف لا وقت لدي لكن ابدئي من هنا

http://www.gulfinthemedia.com/javascript/gimlv.js

انا وجدته في مصدر الصفحة في ثواني معدوده وهذا محتواه

كود: تحديد الكل

//this function to zoom the website
var i=0;
function zoom(id) {
   var str;

   if (id == "1")  {
      i++;
      document.body.style.zoom=1+i/10;
   }
   if (id == "2") {
      i--;
      document.body.style.zoom=1+i/10;
   }
   if (id == "3") {
   document.body.style.zoom=1;
   i=1;
   }
}

function openWindow(url, name, w, h,fullscreen,scrollval,resize)
{
   if(scrollval =='no')
      {
      scrollvall='no';
      }
   else
      {
      scrollval='yes';
      }
   
   if(resize =='no')
      {
      resize='no';
      }
   else
      {
      resize='yes';
      }
   
   if (window.screen)
   {
        if(fullscreen!=1)
         {   
         w = (null == w) ? 490 : w;
         h = (null == h) ? 490 : h;
         }
      else
         {
          w = window.screen.availWidth;
            h = window.screen.availHeight
            }
      var windowWidth = w;
      var windowHeight = h;
      var x = (screen.availWidth - windowWidth) / 2;
      var y = (screen.availHeight - windowHeight) / 2;
      
      popup = window.open(url,name,"dependent,resizable="+resize+",scrollbars="+scrollval+",width=" + windowWidth + ",height=" + windowHeight + ",left=" + x + ",top=" + y);
      
      //popup.window.title='xyz';
        if (popup.focus !=null) { popup.focus(); }
   }
}

function sugested_words(frm,no_sugg)
{
   var full_sugg = "";
   for (i=0;i<no_sugg;i++)
         {
      full_sugg =  full_sugg + frm.search_suggestion[i].value+" ";
         }
   frm.search_val.value = full_sugg;
}
   
function check_empty(frm)
{
   if(frm.search_val.value == '')
   {
      alert("Enter search text");
      frm.search_val.focus();
      return false;
   }
}

function add2favorite()       
{               
   if(window.external)               
   {                       
      window.external.AddFavorite(location.href,'Gulf in the Media')             
   }
   else             
   {                       
      alert("Your browser does not support this feature.  If you are using Netscape Navigator --\n" +"Click \"Bookmarks\" and then \"Add Bookmark\"  or type \"Ctrl+D\" to add this site to your favorites.");
   }       
}

function show_hide(itemName,itemNo,on)
{
   var itemObj;
   itemObj = itemName + itemNo;
   if(on)
   {
      if (document.all.item(itemObj).style.display == "none")
      {
         document.all.item(itemObj).style.display = "inline";
      }else
      {
         document.all.item(itemObj).style.display = "none";
      }
   }
}

function view_articles(url,men)
{
   window.open(url,'','scrollbars=yes,resizable=yes,dependent=yes,location=no,menubar='+men+',status=no,toolbar=no,titlebar=no,width=520,height=500,left=0,top=0');
}

function new_window(url, name, w, h,fullscreen,scrollval) {
   if(scrollval =='no') {
      scrollvall='no';
   } else {
      scrollval='yes';
   }
   if (window.screen) {
        if(fullscreen!=1) {   
         w = (null == w) ? 490 : w;
         h = (null == h) ? 490 : h;
      } else {
          w = window.screen.availWidth;
            h = window.screen.availHeight
        }
      var windowWidth = w;
      var windowHeight = h;
      var x = (screen.availWidth - windowWidth) / 2;
      var y = (screen.availHeight - windowHeight) / 2;
      popup = window.open(url,name,"dependent,resizable=no,scrollbars="+scrollval+",width=" + windowWidth + ",height=" + windowHeight + ",left=" + x + ",top=" + y);
      //popup.window.title='xyz';
        if (popup.focus !=null) { popup.focus(); }
   }
}

function open_img_win(x,y,img,image_title){   
   //get image hieght & width
   myimg = new Image();
   myimg.src = img;
   //open new window with image
   mywin = window.open("","",config="width="+(x+50)+",height="+(y+30)+",scrollbars=no,status=no,resizable=no");                  
   mywin.document.write('<html><head><title>'+unescape(image_title)+'</title>\n</head><body onload="javascript:window.print();"><TABLE>\n<TR><TD valign="top"><img src="'+img+'" border="0"></TD><TD width="40" alt="Print Image" valign="top"><A HREF="#" onclick="javascript:window.print();"><img src="/images/print_article.gif" border="0" ></A></TD></TR></TABLE></body></html>');
}



بس عليك تفقد المصدر لكي تفهمي كيف تضمينة في الصفحه الحمدلله المسئلة مصدر ومفتوح

في نفس الصفحة من المتصفح عرض>>المصدر :wink:
expertsniper
عضو نشيط
مشاركات: 186
اشترك في: 09 نوفمبر 2005, 09:35

مشاركة بواسطة expertsniper »

اتمنا احد يجبه لي لاني ما عرف تطلعه :cry:
مغلق