11 Replies Latest reply on Feb 21, 2016 12:43 AM by try67

    I want to call a separte JavaScript on Div

    ServerVender

      I want this coding will be like this:

       

      html:

      <html>

      <head>

      <meta charset="UTF-8">

      <title>JS Demo</title>

      <link rel="stylesheet" href="http://www.servervender.com/ServerVenderWebsiteFolder/ServerVenderJavaScript.css">

      <sript type+"text/javascript" src="http://www.servervender.com/DemoFolder/DemoJS.js"></sript>

      </head>

       

       

      <body>

      <script src="http://www.servervender.com/DemoFolder/DemoJS.js"></script></p>

      </body>

      </html>

       

      JavaScript:

      <script type="text/javascript">

      var slideimages = new Array()

      slideimages[0] = new Image()

      slideimages[0].src = "http://www.servervender.com/ServerVenderWebsiteFolder/SVImages/TopContainer_Display_Left_D esign1.jpg"

      slideimages[1] = new Image()

      slideimages[1].src = "http://www.servervender.com/ServerVenderWebsiteFolder/SVImages/TopContainer_Display_Left_N etwork2.jpg"

      slideimages[2] = new Image()

      slideimages[2].src = "http://www.servervender.com/ServerVenderWebsiteFolder/SVImages/TopContainer_Display_Left_S oftware3.jpg"

      </script>

       

      <img src="http://www.servervender.com/ServerVenderWebsiteFolder/SVImages/TopContainer_Display_Left_D esign1" id="slide" width="352" height="352"/>

       

      <script type="text/javascript">

      var step=0

      function slideit(){

      if (!document.images)

      return

      document.getElementById('slide').src = slideimages[step].src

      if (step<2)

      step++

      else

      step=0

      setTimeout("slideit()",2500)

      }

      slideit()

      </script>

       

       

      ((((((((((((((((((((((((((((But This not Working)))))))))))))))))))))))))))))))))))

       

       

      When I put Like this:

       

       

      <html>

      <head>

      <meta charset="UTF-8">

      <title>JS Demo</title>

      <link rel="stylesheet" href="http://www.servervender.com/ServerVenderWebsiteFolder/ServerVenderJavaScript.css">

      <sript type+"text/javascript" src="http://www.servervender.com/DemoFolder/DemoJS.js"></sript>

      </head>

       

       

      <body>

      <script type="text/javascript">

      var slideimages = new Array()

      slideimages[0] = new Image()

      slideimages[0].src = "http://www.servervender.com/ServerVenderWebsiteFolder/SVImages/TopContainer_Display_Left_D esign1.jpg"

      slideimages[1] = new Image()

      slideimages[1].src = "http://www.servervender.com/ServerVenderWebsiteFolder/SVImages/TopContainer_Display_Left_N etwork2.jpg"

      slideimages[2] = new Image()

      slideimages[2].src = "http://www.servervender.com/ServerVenderWebsiteFolder/SVImages/TopContainer_Display_Left_S oftware3.jpg"

      </script>

       

      <img src="http://www.servervender.com/ServerVenderWebsiteFolder/SVImages/TopContainer_Display_Left_D esign1" id="slide" width="352" height="352"/>

       

      <script type="text/javascript">

      var step=0

      function slideit(){

      if (!document.images)

      return

      document.getElementById('slide').src = slideimages[step].src

      if (step<2)

      step++

      else

      step=0

      setTimeout("slideit()",2500)

      }

      slideit()

      </script>

       

      </body>

      </html>

       

       

       

       

       

      ((((((((((((((((((((((((((((((((((((((((( But I want to call Javascript like first one. Please help me what shall I do.

        • 1. Re: I want to call a separte JavaScript on Div
          try67 MVP & Adobe Community Professional

          This forum is about JavaScript in PDF files, not in web-pages.

          • 2. Re: I want to call a separte JavaScript on Div
            ServerVender Level 1

            Ok, Please tell me what shall I do for that that?

            • 3. Re: I want to call a separte JavaScript on Div
              ServerVender Level 1

              Please send me a sample for calling a JavaScript on Div

              • 4. Re: I want to call a separte JavaScript on Div
                Liam Dilley Adobe Community Professional & MVP

                There is no need to post multiple times on the same topic across every aspect of the forums.

                You need to google javascript in general and take some online courses, read some guides etc. Your asking people to basically teach you javascript... You can get the information yourself.

                • 5. Re: I want to call a separte JavaScript on Div
                  gkaiseril MVP & Adobe Community Professional

                  JavaScript supports the function object. Like the function you learned abut  in high school math classed you have a process that can take optional parameters and apply a series of computations or actions and optional return the result o the process. It is documented in the MDN JavaScript Reference.

                  • 6. Re: I want to call a separte JavaScript on Div
                    ServerVender Level 1

                    <!DOCTYPE Server Vender Website>

                    <html lang="en-US">

                    <title>Server Vender</title>

                    <head>

                    <meta charset="UTF-8">

                    <link rel="stylesheet" href="ServerVenderWebsiteFolder/ServerVenderWebsiteMenuStyle.css">

                    <link rel="Shortcut icon" href="ServerVenderWebsiteFolder/SVImages/FevIcon.png">

                    <script type="text/javascript" src="ServerVenderWebsiteFolder/TopContainer_Display_Left.js"></script>

                    </head>

                     

                    <body>

                    <div class="TopContainer">

                    <div class="TopContainer_Resize">

                      <div class="CompanyLogo"><a href="index.php"><img src="ServerVenderWebsiteFolder/SVImages/FevIcon.JPG" width="40" height="40"></div>

                      <div class="LetterLogo"><a href="index.php"><span>Ser</span>ver</span> Ven</span>der</big></a></div>

                      <div class="Menu_Navigation">

                        <ul>

                          <li class="active"><a href="index.php">Home</a></li>

                          <li><a href="design.php">Design</a></li>

                          <li><a href="network.php">Network</a></li>

                          <li><a href="software.php">Software</a></li>

                          <li><a href="partner.php">Partner</a></li>

                          <li><a href="about.php">Company</a></li>

                          <li><a href="contact.php">Contact</a></li>

                        </ul>

                      </div>

                      <div class="TopContainer_Display_Left">

                      <script src="ServerVenderWebsiteFolder/TopContainer_Display_Left.js"></script>

                      </div>

                      <div class="TopContainer_Display_Right">

                        <p> The Page is under Construction</p>

                      </div>

                    </div>

                    </body>

                    </html>

                     

                     

                    CSSSSSSSSSSSSSSSSSSSSS:

                     

                    body {

                        margin: auto;

                        width: 100%;

                        font: Arial, Helvetica, sans-serif;

                    }

                    .TopContainer, .MidContainer, .EndContainer {

                        padding: 0;

                        margin: auto;

                        width: auto;

                    }

                    .TopContainer_Resize, .MidContainer_Resize {

                        padding: 60px;

                        margin: auto;

                        width: 1024px;

                    }

                    .CompanyLogo {

                        float: left;

                        height: 60px;

                        width: 40px;

                        margin: auto;

                    }

                    .LetterLogo {

                        float: left;

                        width: 312px;

                        height: 60px;

                    }

                    .LetterLogo a {

                        text-decoration: none;

                        font-size: 36px;

                        font-style: italic;

                    }

                    .Menu_Navigation {

                        height: 60px;

                        width: 672px;

                        margin: 0;

                        float: right;

                    }

                    .Menu_Navigation ul {

                        padding: 0;

                        margin: 0;

                    }

                    .Menu_Navigation ul li {

                        width: 96px;

                        height: 60 px;

                        list-style-type: none;

                        float: left;

                        background: #0F5;

                        margin: 0;

                        border-top-left-radius: 10px;

                        border-top-right-radius: 10px;

                    }

                    .Menu_Navigation ul li a {

                        text-align: center;

                        display: block;

                        padding: 0;

                        margin: auto;

                        color: #F00;

                        text-decoration: none;

                        font-size: 16px;

                        line-height: 60px;

                    }

                    .TopContainer_Display_Left {

                        float: left;

                        width: 352px;

                        overflow: visible;

                        height: 352px;

                        background-color: #FF9F00;

                    }

                    .TopContainer_Display_Right {

                        float: right;

                        width: 672px;

                        overflow: visible;

                        height: 352px;

                        background: #0F0;

                    }

                    .menu_nav ul li.active a, .menu_nav ul li a:hover {

                        color: #fff;

                        text-decoration: none;

                    }

                    .Clear {

                        clear: both;

                        width: 100%;

                        font-size: 0px;

                        line-height: 0px;

                        background: #0F5;

                    }

                    .MidLeftBox {

                        width: 512px;

                        height: 200px;

                        float: left;

                        font-size: 36px;

                    }

                    .MidRightBox {

                        width: 512 px;

                        height: 200px;

                        float: Right;

                        font-size: 36px;

                    }

                    .TopContainer .TopContainer_Resize .TopContainer_Display_Left {

                        color: #000;

                    }

                     

                     

                     

                    JavaSript:

                    <script type="text/javascript">

                    var slideimages = new Array()

                    slideimages[0] = new Image()

                    slideimages[0].src = "ServerVenderWebsiteFolder/SVImages/TopContainer_Display_Left_Design1.jpg"

                    slideimages[1] = new Image()

                    slideimages[1].src = "ServerVenderWebsiteFolder/SVImages/TopContainer_Display_Left_Network2.jpg"

                    slideimages[2] = new Image()

                    slideimages[2].src ="ServerVenderWebsiteFolder/SVImages/TopContainer_Display_Left_Software3.jpg"

                    </script>

                    <img src="ServerVenderWebsiteFolder/SVImages/TopContainer_Display_Left_Design1.jpg" id="slide" width="352" height="352"/>

                    <script type="text/javascript">

                    var step=0

                    function slideit(){

                    if (!document.images)

                    return

                    document.getElementById('slide').src = slideimages[step].src

                    if (step<2)

                    step++

                    else

                    step=0

                    setTimeout("slideit()",2500)

                    }

                    slideit()

                    </script>

                    • 7. Re: I want to call a separte JavaScript on Div
                      ServerVender Level 1

                      I want to tag a separate JavaScript on Div. Please help me to do it.

                      • 8. Re: I want to call a separte JavaScript on Div
                        Liam Dilley Adobe Community Professional & MVP

                        Sorry but what your asking does not really make sense.

                        • 9. Re: I want to call a separte JavaScript on Div
                          ServerVender Level 1

                          I want to create separate a java script file and want to tag it only on div file.

                          • 10. Re: I want to call a separte JavaScript on Div
                            ServerVender Level 1

                            When I create directly it is working but when work separately then it is not working.

                            • 11. Re: I want to call a separte JavaScript on Div
                              try67 MVP & Adobe Community Professional

                              This thread has nothing to do with Acrobat. I'm locking it.