Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jun 2006
    Location
    Gainsborough
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up New User Needs Help

    Hi

    Today i have used a posting on here to help give me a daily random image which i have set up. However, i want to allow users to be able to click on the image and see them in the full size.

    Can you please help me? The site this is on is www.freepspwallpapers.co.uk
    --
    Peter Potter
    PSP Wallpapers

  • #2
    Regular Coder
    Join Date
    Jun 2006
    Location
    Gainsborough
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool

    Any other help is very much welcomed as i am a total newbie to HTML let alone Java.
    --
    Peter Potter
    PSP Wallpapers

  • #3
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Change this
    Code:
    <script>
    <!-- 
    var mondayimg="small_babe_abititmuss.jpg" 
    var tuesdayimg="small_babe_abititmuss2.jpg" 
    var wednesdayimg="small_babe_abititmuss3.jpg"
    var thursdayimg="small_babe_abititmuss4.jpg" 
    var fridayimg="small_babe_abititmuss5.jpg" 
    var saturdayimg="small_babe_abititmuss6.jpg" 
    var sundayimg="small_babe_abititmuss7.jpg"
    var mydate=new Date()
    var today=mydate.getDay()
    if (today==1)
    document.write('<img src="'+mondayimg+'">')
    else if (today==2)
    document.write('<img src="'+tuesdayimg+'">')
    else if (today==3)
    document.write('<img src="'+wednesdayimg+'">')
    else if (today==4)
    document.write('<img src="'+thursdayimg+'">')
    else if (today==5)
    document.write('<img src="'+fridayimg+'">')
    else if (today==6)
    document.write('<img src="'+saturdayimg+'">')
    else
    document.write('<img src="'+sundayimg+'">')
    //-->
    
    </script>
    to this
    Code:
    <script type="text/javascript">
    <!-- 
    var smallimg = new Array(); //these are the smaller images
    smallimg[0] = "small_babe_abititmuss.jpg";
    smallimg[1] = "small_babe_abititmuss2.jpg";
    smallimg[2] = "small_babe_abititmuss3.jpg";
    smallimg[3] = "small_babe_abititmuss4.jpg";
    smallimg[4] = "small_babe_abititmuss5.jpg";
    smallimg[5] = "small_babe_abititmuss6.jpg";
    smallimg[6] = "small_babe_abititmuss7.jpg";
    
    var largeimg = new Array(); //these are the larger images
    largeimg[0] = "large_babe_abititmuss.jpg";
    largeimg[1] = "large_babe_abititmuss2.jpg";
    largeimg[2] = "large_babe_abititmuss3.jpg";
    largeimg[3] = "large_babe_abititmuss4.jpg";
    largeimg[4] = "large_babe_abititmuss5.jpg";
    largeimg[5] = "large_babe_abititmuss6.jpg";
    largeimg[6] = "large_babe_abititmuss7.jpg";
    
    var mydate = new Date();
    var today = mydate.getDay() - 1;
    
    window.onload = function()
    {
    	document.getElementById('thumbimg').setAttribute('src',smallimg[today]);
    	document.getElementById('thumblink').setAttribute('href',largeimg[today]);
    }
    //-->
    </script>
    <a id="thumblink"><img src="#" id="thumbimg" alt="" style="border:0;"></a>
    And Java is NOT Javascript. They are two totally different languages, don't confuse them.
    Last edited by _Aerospace_Eng_; 06-26-2006 at 10:39 PM.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #4
    Regular Coder
    Join Date
    Jun 2006
    Location
    Gainsborough
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Many thanks. That is a great help. Im very new to all this web world and really looking to make a go of this site.
    --
    Peter Potter
    PSP Wallpapers


  •  

    Posting Permissions

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