473,769 Members | 2,365 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PLEASE HELP

This has been driving me crazy for days:

IF ANYONE CAN HELP FIX THE HTML BELOW, PLEASE HELP! (please email me
at ma******@gmail. com - or reply here)

i am trying to load up a random background image which is the
background for the table. at the moment the image in the html is named
1.jpg (and i woulld like it to rotate with 3 other images 2.jpg, 3.jpg,
4.jpg)
I'm not sure if i need to put something in the head tags, if it is java
script that i need, and although i have done random images before, it
seems more difficult that it is a background and that it isn';t a page
background but a table background.
here goes, and help appreciated:


<html>
<head>
<title>Untitl ed Document</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<style type="text/css">
<!--
..style1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
}
..style4 {color: #000000}
-->
</style>
</head>
<body>
<table width="850" height="589" border="0" align="center"
background="1.j pg">
<tr>
<td width="436" height="182" align="left" valign="top"> </td>
<td height="182" colspan="2"> </td>
<td width="116" height="182"> </td>
<td width="114" height="182"> </td>
</tr>
<tr>
<td height="177"> </td>
<td height="177" colspan="2"> </td>
<td height="177"> </td>
<td height="177"> </td>
</tr>
<tr align="left" valign="middle" >
<td height="54" valign="bottom" nowrap><form action="" method="post"
name="form1">

<input name="textfield " type="text" value="client login" size="15">
<input name="textfield 2" type="text" value="password " size="15">
<input type="submit" name="Submit" value="Go">
</form></td>
<td height="54" colspan="2"> </td>
<td height="54" nowrap> </td>
<td height="54" nowrap> </td>
</tr>
<tr>
<td height="165" valign="top"><p class="style1"> </p>
</td>
<td width="30" height="165" align="center" valign="middle" > </td>
<td width="132" height="165" align="center" valign="bottom" ><p
class="style1"> Clients</p></td>
<td width="116" height="165" align="center" valign="bottom"
class="style1"> <p>Staff</p> </td>
<td width="114" height="165" align="center" valign="bottom" ><p
class="style1"> Text service </p> </td>
</tr>
</table>
</body>
</html>

Jul 23 '05 #1
8 1340
wrote on 23 dec 2004 in comp.lang.javas cript:
This has been driving me crazy for days:

IF ANYONE CAN HELP FIX THE HTML BELOW, PLEASE HELP! (please email me
at ma******@gmail. com - or reply here)


There is no javascript in your problem, so please ask elsewhere.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 23 '05 #2
i had been told on another forum that javascript was involved, thats
why i posted here, the javascript forum.

Jul 23 '05 #3
There is an example at http://www.dyn-web.com/javascript/rotate-img/

ma******@gmail. com wrote:
i had been told on another forum that javascript was involved, thats
why i posted here, the javascript forum.


Jul 23 '05 #4
none of the examples on that website deal with a random image as a
background of a table. can anyone help?

Jul 23 '05 #5
<ma******@gmail .com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
none of the examples on that website deal with a random image as a
background of a table. can anyone help?


Responses are under "Random Background Image Scripts??" in
comp.lang.javas cript.
Jul 23 '05 #6
wrote on 24 dec 2004 in comp.lang.javas cript:
none of the examples on that website deal with a random image as a
background of a table. can anyone help?


As your are posting on usenet,
please quote the part of the posting you are replying on.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 23 '05 #7
Hi Matt,

You need to place some javascript code into the file:

Add this between your header tags

<script>
function RndImage(t) {
var i = parseInt(Math.r andom() * 5) + 1;
document.getEle mentById(t).bac kground = i + ".jpg";
}
</script>

and then change your code at the beginning of the body to this:

<body onLoad='RndImag e("imgTable");' >
<table id="imgTable" width="850" height="589" border="0" align="center"
background="1.j pg">
This will give you random images from 1 to 5 - change the number 5 in the
function to give you more (or less) images.

HTH

Merry Christmas

Martin

<ma******@gmail .com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
none of the examples on that website deal with a random image as a
background of a table. can anyone help?

Jul 23 '05 #8
JRS: In article <41********@new s.star.co.uk>, dated Fri, 24 Dec 2004
10:15:45, seen in news:comp.lang. javascript, Martin Walke
<ma**********@s pamvega.co.uk> posted :
var i = parseInt(Math.r andom() * 5) + 1;


Why do you recommend parseInt , involving conversion to String and back
again, instead of Math.floor as in the newsgroup FAQ, or possibly |0 ?

--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.c om/faq/> JL/RC: FAQ of news:comp.lang. javascript
<URL:http://www.merlyn.demo n.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 23 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1702
by: Kurt Watson | last post by:
I’m having a different kind of problem with Hotmail when I sign in it says, "Web Browser Software Limitations Your Current Software Will Limit Your Ability to Use Hotmail You are using a web browser that Hotmail does not support. If you continue to use your current browser software we cannot guarantee that Hotmail will work correctly for you". Please help, this is very annoying. I have been searching for help on
7
3615
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title> </head> <style type="text/css">
7
3296
by: tyler_durden | last post by:
thanks a lot for all your help..I'm really appreciated... with all the help I've been getting in forums I've been able to continue my program and it's almost done, but I'm having a big problem that I believe if it's solved, the remaining stuff is easy... my full program until now is here: http://www.geocities.com/tom4_h4wk/progmail.zip the problem is the segmentation fault when main trys to run leficheiro.c.... the *.c2 files are the...
23
3284
by: Jason | last post by:
Hi, I was wondering if any could point me to an example or give me ideas on how to dynamically create a form based on a database table? So, I would have a table designed to tell my application to create certain textboxes, labels, and combo boxes? Any ideas would be appreciated. Thanks
13
4335
by: Joner | last post by:
Hello, I'm having trouble with a little programme of mine where I connect to an access database. It seems to connect fine, and disconnect fine, but then after it won't reconnect, I get the error "operation is not allowed when object is open" so I take out the line of code: BookDetails.Connection1.Open and it comes up with the error "operation is not allowed when object
1
9651
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej and I was wondering if anyone here would be able to give me some tips for young players such as myself, for learning the language. Is this the best Newsgroup for support with JAVA?
1
54532
PEB
by: PEB | last post by:
POSTING GUIDELINES Please follow these guidelines when posting questions Post your question in a relevant forum Do NOT PM questions to individual experts - This is not fair on them and we instruct our experts to ignore any such PMs completely Be sure to give the version of Access that you are working with and the Platform and OS if applicable.
0
3057
by: 2Barter.net | last post by:
newsmail@reuters.uk.ed10.net Fwd: Money for New Orleans, AL & GA Inbox Reply Reply to all Forward Print Add 2Barter.net to Contacts list Delete this message Report phishing Show original
6
3326
by: jenipriya | last post by:
Hi all... its very urgent.. please........i m a beginner in oracle.... Anyone please help me wit dese codes i hv tried... and correct the errors... The table structures i hav Employee (EmpID, EmpName,DeptID,DateOfJoin, Sal, Addr) Finance (EmpID, Sal) Club (Clubname, EmpID, Fee, DateOfJoin) Leave (EmpID, Date) Department (DeptID, DeptName, NoOfEmployees)...
5
2318
by: tabani | last post by:
I wrote the program and its not giving me correct answer can any one help me with that please and specify my mistake please it will be highly appreciable... The error arrives from option 'a' it asks for user name, check in the system but does not return the correct answer please help me with it. or if you have better way of doing it would you please mind to tell me.. thanks.. #!/usr/bin/perl -w #use Getopt::Std;
0
9586
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10043
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9990
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8869
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5298
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3956
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3561
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2814
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.