Debt Consolidation - Barbara Boxer - Debt Consolidation - Articles directory - Creative Electronics

PDA

View Full Version : HELP! me with this code!!


Crisis23
Dec 12th 2008, 12:02 pm
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"


<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);
}

if (img == "1") {
document.write(b1dis + "2.aspx" + bdis + "Babes/1/2.jpg\"" + edis);
}

if (img == "2") {
document.write(b1dis + "3.aspx" + bdis + "Babes/1/3.jpg\"" + edis);
}

// -->
</script>


EXAMPLE:

(-_-) <--- this is random image
(SPACE)
Im Handsome <--- this text
11:06 <--- this is text

DrennanSoftware
Dec 12th 2008, 2:35 pm
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>

Crisis23
Dec 12th 2008, 6:02 pm
Yep Thank u Much!!! REPUTATION 4 you Thread Closed ;)

justcoolsam
Dec 13th 2008, 6:48 am
Why u not use Ajax. This is better than this.if u intersted than msg me i will give the whole idea

justcoolsam
Dec 13th 2008, 11:05 am
hello,
Tell me which language you used for your site.Because Ajax works differently on all language and code is also differece.

Crisis23
Dec 13th 2008, 1:25 pm
ok i got it.. thanks people.. ;)