- Total Members: 220,321
- Threads: 525,398
- Posts: 977,016
Great community. Great ideas.
Welcome to ASP/Free, a community dedicated to helping beginners and professionals alike in improving their knowledge of Microsoft's development and administration technologies. Sign up today to gain access to the combined insight of tens of thousands of members.
-
November 6th, 2012, 03:17 AM
#1
using img in if structure within javascript
I have following code, why doesn't it work. I'm new to html / javascript so sorry for it.
[code]
<script type="text/javascript">
function ShowPhoto() {
var code = prompt("Enter number:");
if (code == 1) {
image1 = newImage();
image1.src = "/fotos/201201/01.jpg";
}
if (code == 2) {
image1 = newImage();
image1.src = "/fotos/201201/02.jpg";
}
}
</script>
</head>
<body onload=ShowFoto()>
</body>
Similar Threads
-
By jareda17 in forum Microsoft Access Help
Replies: 6
Last Post: June 25th, 2011, 12:56 PM
-
By RSS_News_User in forum Technology News
Replies: 0
Last Post: March 11th, 2011, 05:00 PM
-
By icoombs in forum HTML, JavaScript And CSS Help
Replies: 5
Last Post: August 2nd, 2009, 01:06 PM
-
By pkirill in forum Microsoft Access Help
Replies: 3
Last Post: September 9th, 2008, 11:38 PM
-
By Steve Schofield in forum ASP Development
Replies: 0
Last Post: December 20th, 2001, 08:06 AM