Jump to content
php.lv forumi

palidziba ar Scripta izveidi


snach15

Recommended Posts

Sveiki , vai kāds varētu lūdzu uztaisīt scriptu varteikt tādu pašu kā šajā weba , http://www.mornia.com/ ieejot parādas banneris un zem tā ķipa Remind me in 10 min .. uzpiežot to banneris pazūd uz 10 minūtēm bet uzpiežot uz bannera atveras attiecīga weblapa . Mocījos ilgi pats bet nekā nesanāca , palīdzēsiet lūdzu ?

Link to comment
Share on other sites

Sāc taisīt skriptu un tad ja nekādi nevari saprast kāpēc nedarbojas, prasi palīdzību forumā! Ja gribi, lai cits tavā vietā strādā, tad lai cits arī tavā vietā saņem naudu par to.

 

Piebilde:

Kāpēc svarīgi ir veidot pašam, nevis prasīt citam? Vismaz kodolu! Gluži vienkārši - tev dzīvē jāiemācās, ka ja par kaut ko uzņemies atbildību, tad pats arī to dari un atbildi par to, citiem nav jādala citu atbildība...

Edited by Web Developer
Link to comment
Share on other sites

nu būtu kāds prasījis tad pateiktu kas nesanāaca ... man nesanāk ar to JS scriptu .. ķipa visu samontēju bet uzpiežot uz to remind tas banneris nepazud un arī līdzi neiet tātad JS nestrādā vai arī nepareizi uz viņu norādīju ..

 

Rekur mans index ..

 

<?php
inculdes('text.js');
?>
<div style="position: absolute; top: 0px; left: 0px; width: 1424px; height: 1762px; background-color: rgb(0, 0, 0); visibility: visible; opacity: 0.7; z-index: 99998;"></div><div style="position: absolute; top: 844.667px; left: 478px; width: 468px; background-color: rgb(0, 0, 0); z-index: 99999;"><div style="color: rgb(255, 255, 255); cursor: pointer; text-align: center;">Vote for us...</div><a target="_blank" href="http://www.xtremetop100.com/in.php?site=1132212198"><img style="border: 1px solid rgb(255, 255, 255);" src="http://www.mornia.com/banner.gif"></a><div style="padding: 5px; position: absolute; top: 0px; right: 0px; font-size: 14px; font-weight: bold; color: rgb(255, 255, 255);"></div><div style="color: rgb(255, 255, 255); cursor: pointer; text-align: center;">Remind me in 10 minutes.</div></div></body></html>

 

un JavaScript

 

<script type='text/javascript'>
 var voteImage = new Asset.image('/banner.gif');
 var voteLinks = ['http://topsiteling.pvv'];
 var voteNr = 1;

 var hiddenNodes = new Array();

 window.addEvent('load', function(){
     if(window.ie){
         $$('select').each(function(el){
             hiddenNodes.push(el);
             el.setStyle('visibility', 'hidden');
         });
     }

     var blackLayer = new Element('div', {
         'styles': {
             'position': 'absolute',
             'top': '0px',
             'left': '0px',   
             'width': window.getScrollWidth(),
             'height': window.getScrollHeight(),
             'background-color': '#000000',
             'opacity': 0.7,
             'z-index': 99998
         }
     }).injectInside(document.body);

     var voteContainer = new Element('div', {
         'styles': {
             'position': 'absolute',
             'top': ( window.getScrollTop() + ( window.getHeight() - voteImage.height ) / 3 ),
             'left': ( window.getScrollLeft() + ( window.getWidth() - voteImage.width ) / 2 ),
             'width': voteImage.width,
             'background-color': '#000000',
             'z-index': 99999
         }
     }).injectInside(document.body);

     var voteForUs = new Element('div', { 
         'styles': { 
             'color': '#FFFFFF', 
             'cursor': 'pointer', 
             'text-align': 'center' 
         } 
     }).setText('Vote for us...').injectInside(voteContainer);

  var voteLink = new Element('a', {
         'href': voteLinks[voteNr - 1],
         'target': '_blank'
     }).injectInside(voteContainer);
     voteImage.setStyle('border', '1px solid #FFFFFF').injectInside(voteLink);

     var voteNumber = new Element('div', {
         'styles': {
             'position': 'absolute',
             'top': '0px',
             'right': '0px',
             'font-size': 14,
             'font-weight': 'bold',
             'color': '#FFFFFF',
             'padding': '5px'
         }
     }).setText('').injectInside(voteContainer);

     var voteAbort = new Element('div', {
         'styles': {
             'color': '#FFFFFF',
             'cursor': 'pointer',
             'text-align': 'center'
         }
     }).setText('Remind me in 10 minutes.').injectInside(voteContainer);

     voteAbort.addEvent('click', function(){
         createCookie('morniavote', 'morniavote', '10');
         if(window.ie) hiddenNodes.each(function(el){ el.setStyle('visibility', ''); });
         blackLayer.remove();
         voteContainer.remove();
         window.removeEvents('scroll').removeEvents('resize');
         Garbage.trash([blackLayer, voteContainer]);
     });

     voteLink.addEvent('click', function(){
         createCookie('morniavote', 'morniavote', '720');
         voteNr++;
         (function(){
             if(voteNr > voteLinks.length){
                 if(window.ie) hiddenNodes.each(function(el){ el.setStyle('visibility', ''); });
                 blackLayer.remove();
                 voteContainer.remove();
                 window.removeEvents('scroll').removeEvents('resize');
                 Garbage.trash([blackLayer, voteContainer]);
             }else{
                 voteLink.href = voteLinks[voteNr - 1];
                 voteNumber.setText('Click here to vote');
             }
         }).delay(10);
     });

     window.addEvent('scroll', function(){
         voteContainer.setStyles({
             'top': ( window.getScrollTop() + ( window.getHeight() - voteImage.height ) / 3 ),
             'left': ( window.getScrollLeft() + ( window.getWidth() - voteImage.width ) / 2 )
         })
     });

     window.addEvent('resize', function(){
         blackLayer.setStyles({
             'width': window.getScrollWidth(),
             'height': window.getScrollHeight()
         });
         voteContainer.setStyles({
             'top': ( window.getScrollTop() + ( window.getHeight() - voteImage.height ) / 3 ),
             'left': ( window.getScrollLeft() + ( window.getWidth() - voteImage.width ) / 2 )
         })
     });
 });</script>

Edited by snach15
Link to comment
Share on other sites

FAIl čalīt ;) Web Developer skaidri u gaisī tev pateica, ko vaig :D tad aizej nu pie tantes GUUGLES un pajautā :) ja šī nedod sek*u značit nepareizā pieeja, nāc uz php.lv/f un sarunāsim tev randiņu ar viņu! :P vai tā ir saprotamāk? :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...