Results 1 to 2 of 2

Thread: can anyone help please?

  1. #1
    Join Date
    Oct 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default can anyone help please?

    i have to diffrent java script in saame page that both of them need to be in head tag but when u refresh the page only one of the scripts come up
    can u tell me what to do please? this is the script

  2. #2
    Join Date
    Oct 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default this is the script

    here it is
    <html>
    <head>
    <script type="text/javascript">

    //

    adTime=8; // seconds ad reminder is shown
    chanceAd=1; // ad will be shown 1 in X times (put 1 for everytime)

    var ns=(document.layers);
    var ie=(document.all);
    var w3=(document.getElementById && !ie);
    var calunit=ns? "" : "px"
    adCount=0;
    function initAd(){
    if(!ns && !ie && !w3) return;
    if(ie) adDiv=eval('document.all.sponsorAdDiv.style');
    else if(ns) adDiv=eval('document.layers["sponsorAdDiv"]');
    else if(w3) adDiv=eval('document.getElementById("sponsorAdDiv").style');
    randAd=Math.ceil(Math.random()*chanceAd);
    if (ie||w3)
    adDiv.visibility="visible";
    else
    adDiv.visibility ="show";
    if(randAd==1) showAd();
    }
    function showAd(){
    if(adCount<adTime*8){adCount+=1;
    if (ie){documentWidth =truebody().offsetWidth/2+truebody().scrollLeft-20;
    documentHeight =truebody().offsetHeight/2+truebody().scrollTop-20;}
    else if (ns){documentWidth=window.innerWidth/2+window.pageXOffset-20;
    documentHeight=window.innerHeight/2+window.pageYOffset-20;}
    else if (w3){documentWidth=self.innerWidth/2+window.pageXOffset-20;
    documentHeight=self.innerHeight/2+window.pageYOffset-20;}
    adDiv.left=documentWidth-200+calunit;adDiv.top =documentHeight-200+calunit;
    setTimeout("showAd()",100);}else closeAd();
    }
    function closeAd(){
    if (ie||w3)
    adDiv.display="none";
    else
    adDiv.visibility ="hide";
    }

    function truebody(){
    return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
    }

    onload=initAd;
    //End-->
    </script>

    <div id="sponsorAdDiv" style="visibility:hidden">
    <table width="450px" height="350px" bgcolor="#D13E1D">
    <tr><td>
    <table width="445px" height="345px" bgcolor="#FF9900">
    <tr><td align="center" valign="middle">

    <!--*****EDIT THIS MESSAGE*****-->
    <A HREF="http://www.ariatabar.com">
    <IMG SRC="http://ariatabar.com/pic/eagle.jpg" border="1"></A>
    <p><b><span class="style3"> <br>

    <br>
    <br>
    </span><span class="style2"><span class="style1"></span></span><span class="style1">.</span></b></p>
    <p><A HREF="http://www.ariatabar.com">
    </A></p>
    <p><span class="style4"></span>
    <br>

    <!--*****EDIT THE ABOVE MESSAGE*****-->
    </td></tr></table></td></tr></table>
    </div>


    <script type="text/javascript">

    //


    //Specify the slider's width (in pixels)
    var sliderwidth="600px"
    //Specify the slider's height
    var sliderheight="300px"
    //Specify the slider's slide speed (larger is faster 1-10)
    var slidespeed=2
    //configure background color:
    slidebgcolor="#EAEAEA"

    //Specify the slider's images
    var leftrightslide=new Array()
    var finalslide=''
    leftrightslide[0]='<a href="http://"><img src="images/banner2/1.jpg" border=1></a>'
    leftrightslide[1]='<a href="http://"><img src="images/banner2/2.jpg" border=1></a>'
    leftrightslide[2]='<a href="http://"><img src="images/banner2/3.jpg" border=1></a>'
    leftrightslide[3]='<a href="http://"><img src="images/banner2/4.jpg" border=1></a>'

    //Specify gap between each image (use HTML):
    var imagegap=" "

    //Specify pixels gap between each slideshow rotation (use integer):
    var slideshowgap=5


    ////NO NEED TO EDIT BELOW THIS LINE////////////

    var copyspeed=slidespeed
    leftrightslide='<nobr>'+leftrightslide.join(imagegap)+'</nobr>'
    var iedom=document.all||document.getElementById
    if (iedom)
    document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+leftrightslide+'</span>')
    var actualwidth=''
    var cross_slide, ns_slide

    function fillup(){
    if (iedom){
    cross_slide=document.getElementById? document.getElementById("test2") : document.all.test2
    cross_slide2=document.getElementById? document.getElementById("test3") : document.all.test3
    cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide
    actualwidth=document.all? cross_slide.offsetWidth : document.getElementById("temp").offsetWidth
    cross_slide2.style.left=actualwidth+slideshowgap+"px"
    }
    else if (document.layers){
    ns_slide=document.ns_slidemenu.document.ns_slidemenu2
    ns_slide2=document.ns_slidemenu.document.ns_slidemenu3
    ns_slide.document.write(leftrightslide)
    ns_slide.document.close()
    actualwidth=ns_slide.document.width
    ns_slide2.left=actualwidth+slideshowgap
    ns_slide2.document.write(leftrightslide)
    ns_slide2.document.close()
    }
    lefttime=setInterval("slideleft()",30)
    }
    window.onload=fillup

    function slideleft(){
    if (iedom){
    if (parseInt(cross_slide.style.left)>(actualwidth*(-1)+8))
    cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed+"px"
    else
    cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+slideshowgap+"px"

    if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)+8))
    cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed+"px"
    else
    cross_slide2.style.left=parseInt(cross_slide.style.left)+actualwidth+slideshowgap+"px"

    }
    else if (document.layers){
    if (ns_slide.left>(actualwidth*(-1)+8))
    ns_slide.left-=copyspeed
    else
    ns_slide.left=ns_slide2.left+actualwidth+slideshowgap

    if (ns_slide2.left>(actualwidth*(-1)+8))
    ns_slide2.left-=copyspeed
    else
    ns_slide2.left=ns_slide.left+actualwidth+slideshowgap
    }
    }


    if (iedom||document.layers){
    with (document){
    document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
    if (iedom){
    write('<div style="position:relative;width:'+sliderwidth+';height:'+sliderheight+';overflow:hidden">')
    write('<div style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';background-color:'+slidebgcolor+'" onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed">')
    write('<div id="test2" style="position:absolute;left:0px;top:0px"></div>')
    write('<div id="test3" style="position:absolute;left:-1000px;top:0px"></div>')
    write('</div></div>')
    }
    else if (document.layers){
    write('<ilayer width='+sliderwidth+' height='+sliderheight+' name="ns_slidemenu" bgColor='+slidebgcolor+'>')
    write('<layer name="ns_slidemenu2" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
    write('<layer name="ns_slidemenu3" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
    write('</ilayer>')
    }
    document.write('</td></table>')
    }
    }
    </script>
    <style type="text/css">
    <!--
    #sponsorAdDiv {position:absolute; height:1; width:1px; top:0; left:0;}
    -->
    </style>

    <div align="center"><a href="http://doostyabi.ariatabar.com" target="_blank"><img src="http://doostyabi.ariatabar.com/images/doosty1.jpg" width="600" height="160" border="0" /></a></div>


    <title>FlashChat v4.5.7</title>
    <meta http-equiv=Content-Type content="text/html; charset=UTF-8">

    <style type=text/css>
    <!--
    td {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: normal;
    }
    .small {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    font-weight: normal;
    }
    .title {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: bold;
    }
    input {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: normal;
    }
    select {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: normal;
    }
    A {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    color: #0000FF;
    }
    A:hover {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    color: #FF0000;
    }

    .error_border {
    border: 1px solid #FF0000;
    background-color: #FFFFFF;
    font-size: 12px;
    font-weight: normal;
    }
    -->
    </style>
    <style type="text/css">
    <!--
    #sponsorAdDiv {position:absolute; height:1; width:1px; top:0; left:0;}
    -->
    </style>

    <script language='Javascript'>
    <!--
    function formIsValid() {
    // check to make sure a valid username has been entered
    if ( document.login.username.value == '' ) {
    alert('Please input a username.');
    return false;
    }

    return true;
    }

    // a small poupup window to show who's in the chat at the current time
    function showInfo() {
    // the size of the popup window
    var width = 400;
    var height = 300;

    // the x,y position of the popup window
    // NOTE: this formula will auto-center the popup on the screen
    var y = (screen.height - height) / 2;
    var x = (screen.width - width) / 2;

    var url = 'info.php';
    var options = 'width=' + width + ',height=' + height + ',top=' + y + ',left=' + x + ',resizable';

    // open the info window as a popup, instead of embedded in webpage
    window.open( url, 'info', options );
    }

    function basicLogin() {
    if (formIsValid()) document.login.submit();
    }

    function popupLogin() {
    // check to make sure a valid username has been entered
    if (!formIsValid()) return;

    var username = document.login.username.value;
    var password = document.login.password.value;
    var lang = document.login.lang.value;

    // the size of the popup window
    var width = 800;
    var height = 600;

    // the x,y position of the popup window
    // NOTE: this formula will auto-center the popup on the screen
    var y = (screen.height - height) / 2;
    var x = (screen.width - width) / 2;

    var url = 'http://ariatabar.com/chat/flashchat.php?username=' + username + '&password=' + password + '&lang=' + lang;
    var options = 'width=' + width + ',height=' + height + ',top=' + y + ',left=' + x + ',resizable';

    // open the chat window as a popup, instead of embedded in webpage
    window.open( url, 'chat', options );
    }
    //-->
    </script>

    </head>
    <body>

    <table border="0" align="center" width=500 cellpadding="4">
    <form action="http://ariatabar.com/chat/flashchat.php" method="post">
    </form>


    </tr>

    </table></td>
    </tr>
    </form>
    </table>
    </body>
    </html>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •