-
javascript and asp textbox
Hi,
This is what I have at the moment
<head>
<script type="text/javascript">
var PicList = new Array();
var PicIndex = 0;
function InstallPics(){
PicList[0] = "green.gif";
PicList[1] = "amber.gif";
PicList[2] = "red.gif";
}
function getNextPic(){
PicIndex = (PicIndex + 1) % PicList.length;
return PicList[PicIndex];
}
InstallPics();
</script>
</head>
Then in a table with returned db values:
<td><img src="some image" onclick="this.src=getNextPic();" alt=""/>
<input type="text" name="T<%=i%>" size="20" value = ""> </td>
Now, the picture change works OK but I need to have a value in the text box so I can sent it to the db in order to record the results. Does anyone know a way to do this. I was thinking that the defacult value in the textbox could be 0 then each time the picture is clicked the textbox could go up 1.
Is this possible?
Here is the link - http://www.deanesafl.com/trafficlighttest.asp
Desi
-
Looks to me like your program is already working.
Is this right?
-
 Originally Posted by Emefa
Looks to me like your program is already working.
Is this right?
I agree.....
Are you asking how to write a database INSERT query?
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here?
Got a question on Linux? Visit our Linux sister site.
Modifications Required For VB6 Apps To Work On Vista
Similar Threads
-
Replies: 1
Last Post: 04-29-2007, 02:30 PM
-
By Branta in forum Careers
Replies: 0
Last Post: 08-31-2006, 07:02 PM
-
Replies: 5
Last Post: 05-06-2006, 10:22 PM
-
By shravan in forum ASP.NET
Replies: 3
Last Post: 10-15-2002, 07:40 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks