The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Text on Background Code Wont Work!

4 posters

Go down

Solved Text on Background Code Wont Work!

Post by Donal Tue Jul 27 2010, 00:21

I put up a code so I can type on a image and the text is randomized like a banner jumble but this is text. But the code doesn't work and I desperately need someone to fix it.

Code:
<table border="0" cellpadding="0" cellspacing="0">
<tbody><tr>

<td style="text-align: center;" valign="middle" width="300" background="http://i31.tinypic.com/awuy4h.jpg" height="150">

<script type="text/javascript" >
window.onload=function(){   
var wch=(Math.floor(Math.random()*2)+1);   
document.getElementById('ran'+wch).style.display='inline';

<span id="ran1"><font color="black" size="+1">Hello<br></span></font></td>
</span>
<span id="ran2"><font color="black" size="+1">Bye<br></span></font></td>
</span>

</tr>
</tbody></table>

Thanks in Advance
Donal
Donal
Forumember

Male Posts : 467
Reputation : 3
Language : English
Location : England

http://advertisepilot.com/

Back to top Go down

Solved Re: Text on Background Code Wont Work!

Post by kirk Tue Jul 27 2010, 11:02

hi i got your pm.

i do not know exactly what it is you want?
like what text do you want written in the block's. what part of the blocks and are all three blocks supposed to appear?

i did manage to take out the scribble part of the code that was showing up. but other t6hen that i need to know exactly what it is you want and are trying to do.

Code:
table border="0" cellpadding="0" cellspacing="0">
<tbody><tr>

<td style="text-align: center;" valign="middle" width="300" background="http://i31.tinypic.com/awuy4h.jpg" height="150">

<script type="text/javascript" >


<span id="ran1"><font color="black" size="+1">Hello<br></span></font></td>
</span>
<span id="ran2"><font color="black" size="+1">Bye<br></span></font></td>
</span>

</tr>
</tbody></table>
kirk
kirk
Forumaster

Male Posts : 11037
Reputation : 653
Language : English,Vulcan,Klingon, Romulan,& Gorn

Back to top Go down

Solved Re: Text on Background Code Wont Work!

Post by Donal Tue Jul 27 2010, 20:57

I want to:
A background made in photoshop(done) but I want to type on it using html(done) but I want to make that text like banner jumble (the texts get jumbled up and every time you click away then click back it's a different text)

And I didn't want 3 blocks, I just want one. Hope you can help kirk. Thanks for responding.
Donal
Donal
Forumember

Male Posts : 467
Reputation : 3
Language : English
Location : England

http://advertisepilot.com/

Back to top Go down

Solved Re: Text on Background Code Wont Work!

Post by Donal Wed Jul 28 2010, 19:17

bump. Help please kirk.
Donal
Donal
Forumember

Male Posts : 467
Reputation : 3
Language : English
Location : England

http://advertisepilot.com/

Back to top Go down

Solved Re: Text on Background Code Wont Work!

Post by mollu Wed Jul 28 2010, 20:07

Something like this?

Code:
<script type="text/javascript" >
window.onload=function(){ 
  var texts=["Text 1","Text 2","<a href='http://www.google.com'>Text 3, Click me!</a>","Text 4","Text 5 <img src='http://2img.net/i/fa/i/smiles/icon_razz.gif'>","Text 6"];
  var wch=(Math.floor(Math.random()*6)); 
  document.getElementById('textPlacer').innerHTML = texts[wch];
}
</script>

<table border="0" cellpadding="0" cellspacing="0">
<tbody><tr>
<td style="text-align: center;" valign="middle" width="300" background="http://i31.tinypic.com/awuy4h.jpg" height="150">
<font color="black" size="+3"><span id="textPlacer"></span></font>
</td></tr></tbody></table>
avatar
mollu
New Member

Posts : 5
Reputation : 0
Language : En/Ger/Et

Back to top Go down

Solved Re: Text on Background Code Wont Work!

Post by Donal Thu Jul 29 2010, 10:55

Yes Thanks Mollu! This is solved now Wink
Donal
Donal
Forumember

Male Posts : 467
Reputation : 3
Language : English
Location : England

http://advertisepilot.com/

Back to top Go down

Solved Re: Text on Background Code Wont Work!

Post by Sanket Thu Jul 29 2010, 11:18

Since this thread appears to be solved, I will lock this thread and mark it as solved.
Text on Background Code Wont Work! 2j4t5a8

Sanket Smile

Sanket
Sanket
ForumGuru

Male Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum