Results 1 to 5 of 5

Thread: Need help creating a SCRIPT file for navigation buttons

  1. #1
    Join Date
    Aug 2006
    Posts
    287

    Need help creating a SCRIPT file for navigation buttons

    I am trying to make the coding of the navigation button 'Previous' and 'Next'. But I am not getting the desired result after making a script for the navigation buttons. I am using the following pictures for my project :
    seashore1.jpg, seashore2.jpg, seashore3.jpg.
    If someone know the coding for the navigation button, please provide me that script. Any suggestions are mostly welcomed.!!
    Dimension 1100 (FMY032J) mini-tower
    2.53ghz Intel Pentium 4
    80 gig nfts HDD
    512 RAM
    Main circuit board: Dell 0CF458
    BIOS: Dell A00
    Display: Intel(R) 82865G Graphics Controller [Display adaptor]
    Multimedia: Sound MAX Integrated Digital Audio
    Windows XP Home SP2

  2. #2
    Join Date
    May 2008
    Posts
    2,012

    Re: Need help creating a SCRIPT file for navigation buttons

    I think that you can use the following javascript history function which can take you through the browser history :
    javascript:history.go(1) takes you one page forward
    and
    javascript:history.go(-1) takes you one page back
    I think that this can help you. If you are not looking for this, then explain in details about your requirements, so that I can try to sort the things out.

  3. #3
    Join Date
    Apr 2008
    Posts
    1,948

    Re: Need help creating a SCRIPT file for navigation buttons

    What exactly you want,.?? Do you want the next and Previous buttons which on clicked should get the different images that you have mentioned..? It would be better if you inform the detailed requirement of your project.! If you are looking for the similar scenario that I have mentioned, then I can give the script for that, but I am not sure that you want the same thing. If you want it soon, then you will have to post the requirement sooner.!!

  4. #4
    Join Date
    Aug 2006
    Posts
    287

    Re: Need help creating a SCRIPT file for navigation buttons

    Thanks a lot for replying me sooner. I would like to tell 'Praetor' that I want the script of navigation button which on pressing will redirect the next or previous image respectively. Hope that you got what I am trying to say.!! I also tried some script for that, and this is it :

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Townhouse</title>
    <meta http-equiv="content-type" content="text/html;charset=iso-8859-1" />
    
    <style type="text/css">
    .b1 {
    color: maroon;
    text-align: left;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12pt;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 5px;
    }
    .b2{
    color: olive;
    text-align: left;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12pt;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 5px;
    }
    </style>
    
    <script type="text/javascript">
    //<![CDATA[
    
    var propertyWindow;
    function showProperty("seashore1.jpg")
    propertyWindow=window.open(img src="seashore1.jpg" height="250" width="380" alt="Photo of a Seashore");
    
    //]]>
    </script>
    
    </head>
    
    <body>
    <p class="b1">Seashore: <strong>$319,000</strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    <a href="java script: self.close()">Close Window</a></p>
    <p><img src="seashore1.jpg" height="250" width="380" alt="Photo of a townhouse" /></p>
    <p><a href="java script: history.go(-1)"><img border="0" SRC="previous_blue.gif"></a>
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    <a href="java script: history.go(1)"><img border="0" SRC="next_blue.gif"></p>
    <p class="b2"><strong>4 bed, 2 bath, 17,33 square feet, .42 acres</strong></p>
    </body>
    </html>
    Last edited by Rob Dizzle; 19-01-2010 at 04:46 PM.
    Dimension 1100 (FMY032J) mini-tower
    2.53ghz Intel Pentium 4
    80 gig nfts HDD
    512 RAM
    Main circuit board: Dell 0CF458
    BIOS: Dell A00
    Display: Intel(R) 82865G Graphics Controller [Display adaptor]
    Multimedia: Sound MAX Integrated Digital Audio
    Windows XP Home SP2

  5. #5
    Join Date
    Apr 2008
    Posts
    1,948

    Re: Need help creating a SCRIPT file for navigation buttons

    The script that I have mentioned will definitely help you.

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <head>
    
    <title> Concert Ads </title>
    
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
    
    <script type="text/javascript">
    //<![CDATA[
    var images = new Array(5);
    images[0] = new Image();
    images[1] = new Image();
    images[2] = new Image();
    
    images[0].src ="seashore1.jpg" 
    images[1].src ="seashore2.jpg"
    images[2].src ="seashore3.jpg"
    
    function change (y) {
    var plaatje=document.getElementById("picture");
    var lengte = (plaatje.src).length;
    var picurl = (plaatje.src).substring(lengte-14);
    if(picurl=="seashore1.jpg") { x=0; }
    if(picurl=="seashore2.jpg") { x=1; }
    if(picurl=="seashore3.jpg") { x=2; }
    if(x==0 && y==-1) { x=4; y=0; } 
    else if(x+y>=5) {x=0; y=0; }
    document.getElementById("picture").src = images[x+y].src;
    }
    //]]>
    </script>
    </head>
    <body>
    <p class="b1">Seashore: <strong>$319,000</strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    <a href="javascript:self.close()">Close Window</a></p>
    <p><img src="seashore2.jpg" id="picture" height="250" width="380" alt="Photo of a Seashore" /></p>
    <p><a href="#" onclick="change(-1);"><img border="0" SRC="previous_blue.gif"></a>
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    <a href="#" onclick="change(1);"><img border="0" SRC="next_blue.gif"></a></p>
    </body>
    </html>

Similar Threads

  1. Bash script for creating a new month and year
    By Kohlmann in forum Software Development
    Replies: 4
    Last Post: 30-08-2010, 09:09 PM
  2. How can hide navigation panel buttons in adobe reader
    By Nilakshi in forum Windows Software
    Replies: 5
    Last Post: 13-07-2010, 02:03 AM
  3. creating a script for a host file
    By mopat in forum Technology & Internet
    Replies: 1
    Last Post: 07-07-2010, 11:44 PM
  4. Creating shell script in ubuntu
    By Elizabeth Allen in forum Operating Systems
    Replies: 5
    Last Post: 24-03-2010, 01:35 PM
  5. Creating script with GREP OR ?
    By Aidan 12 in forum Operating Systems
    Replies: 4
    Last Post: 12-03-2010, 08:36 PM

Tags for this Thread

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
  •  
Page generated in 1,713,543,797.45283 seconds with 17 queries