?
Solved

Trying to build web form

Posted on 2014-10-22
9
Medium Priority
?
143 Views
Last Modified: 2014-10-24
I am trying to build a form in ASP.NET(VB code) that has 0-9 in the header of the columns and try to create some kind of row header from 0-9. (Please see the attached pic of what I am trying to create)And when a user clicks into one of the boxes it would pass me the values that I have in the grid already.  Can someone please help me with this.
C--Users-VCISJMK-Desktop-Matrix.jpg
0
Comment
Question by:jknj72
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 22

Expert Comment

by:plusone3055
ID: 40396981
This is fairly simple and can be done in 3 steps
1. create a HTML table and name the columns appropriately
2. make your values txt values or labels
3. do a Javascript onclick  to pass the variable assigned to that txt/lbl value

When you say  "pass me the values "  Please elaborate.. do you want a popup message displaying the value ?? What exactly are you doing with the values...
0
 

Author Comment

by:jknj72
ID: 40397057
I am not real good with html thats why Im trying to get some help on this. When I say pass the values I mean that I need to know which cell is being clicked so I would need to know which column, row was clicked. Thats why I put the values in the cells of what I would want to see. If I could somehow use a grid I know I can capture what cell is being clicked but I just dont know how to set up the grid how I need it to look. Any thoughts?
0
 
LVL 22

Expert Comment

by:plusone3055
ID: 40397398
okay I can help whip something up for you.. I have a meeting this afternoon but I can write something up this evening and post it here
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 

Author Comment

by:jknj72
ID: 40397710
Thanks alot plusone, I would really appreciate your help
0
 
LVL 22

Expert Comment

by:plusone3055
ID: 40399562
i didn't forget about you.. give me about 30-40 min and I'll have the shell of this built
0
 
LVL 22

Accepted Solution

by:
plusone3055 earned 2000 total points
ID: 40399732
Here you go :)

just click on the table column to pass the value in a popup Picture
<html>
<head>
    <title>Experts Exchange HTML Form </title>
	</head>


<body>
    <table align="center" id="tblExample" border="1" style="cursor: pointer;">
        <tr>
            <td bgcolor="yellow">
                0
            </td>
             <td bgcolor="yellow">
                1
            </td>
             <td bgcolor="yellow">
              2
            </td>
             <td bgcolor="yellow">
              3
            </td>
        </tr>
        <tr>
           <td bgcolor="yellow">
                1
            </td>
            <td>
                get the value 
            </td>
            <td>
              another value 
            </td>
            <td>
              numbers 12345 
            </td>
        </tr>
        <tr>
          <td bgcolor="yellow">
             2
            </td>
            <td>
                Hooray	
            </td>
            <td>
           exactly what you asked for
            </td>
            <td>
              you can follow this code 
            </td>
        </tr>
        <tr>
            <td bgcolor="yellow">
               3
            </td>
            <td>
             and create more 
            </td>
            <td>
               as many as you need 
            </td>
            <td>
            have a nice day :) 
            </td>
        </tr>
    </table>
	
	<script language="javascript">
 
        var tbl = document.getElementById("tblExample");
        if (tbl != null) {
            for (var i = 0; i < tbl.rows.length; i++) {
                for (var j = 0; j < tbl.rows[i].cells.length; j++)
                    tbl.rows[i].cells[j].onclick = function () { getval(this); };
            }
        }
 
        function getval(cel) {
            alert(cel.innerHTML);
        }
    </script>
    <br />
    
</body>
</html>

Open in new window

0
 

Author Comment

by:jknj72
ID: 40401937
this looks like exactly what I need.  Thanks plusone this helps me out big time....
0
 

Author Closing Comment

by:jknj72
ID: 40401938
great job bud...
0
 
LVL 22

Expert Comment

by:plusone3055
ID: 40402052
your welcome.. sorry it took so long
0

Featured Post

Setting up LaraDock for Laravel

Learn how to set up LaraDock in a Laravel project - LaraDock gives us an easy way to run a Laravel application using Docker in a single command.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question