HELP! me with this code!!

Discussion in 'JavaScript' started by Crisis23, Dec 12, 2008.

  1. #1
    tell me how can i add hyperlink text and text under the random image??

    "This is the random image script code that im using its only image"



    EXAMPLE:

    (-_-) <--- this is random image
    (SPACE)
    Im Handsome <--- this text
    11:06 <--- this is text
     
    Crisis23, Dec 12, 2008 IP
  2. DrennanSoftware

    DrennanSoftware Active Member

    Messages:
    124
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #2
    Do you mean like this?

    I'm Text! - Edit that for what you want the text to say.

    <script language="javascript">
    <!--
    var b1dis = "<a href=\"";
    var bdis = "\"><img src=\"";
    var edis = " width=\"107\" height=\"179\" alt=\"Babes\" border=\"2px\" style=\"border-color: black\"></a>";
    var rnumb = "";
    var img = "";
    
    rnumb += Math.floor(Math.random() * 3);
    img = rnumb;
    
    if (img == "0") {
    document.write(b1dis + "1.aspx" + bdis + "Babes/1/1.jpg\"" + edis);
    document.write("<p>I'm Text!</p>");
    }
    
    if (img == "1") {
    document.write(b1dis + "2.aspx" + bdis + "Babes/1/2.jpg\"" + edis);
    document.write("<p>I'm Text!</p>");
    }
    
    if (img == "2") {
    document.write(b1dis + "3.aspx" + bdis + "Babes/1/3.jpg\"" + edis);
    document.write("<p>I'm Text!</p>");
    }
    
    // -->
    </script>
    Code (markup):
     
    DrennanSoftware, Dec 12, 2008 IP
  3. Crisis23

    Crisis23 Banned

    Messages:
    81
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yep Thank u Much!!! REPUTATION 4 you Thread Closed ;)
     
    Crisis23, Dec 12, 2008 IP
  4. justcoolsam

    justcoolsam Well-Known Member

    Messages:
    614
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    128
    #4
    Why u not use Ajax. This is better than this.if u intersted than msg me i will give the whole idea
     
    justcoolsam, Dec 13, 2008 IP
  5. justcoolsam

    justcoolsam Well-Known Member

    Messages:
    614
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    128
    #5
    hello,
    Tell me which language you used for your site.Because Ajax works differently on all language and code is also differece.
     
    justcoolsam, Dec 13, 2008 IP
  6. Crisis23

    Crisis23 Banned

    Messages:
    81
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    ok i got it.. thanks people.. ;)
     
    Crisis23, Dec 13, 2008 IP