Click to See Complete Forum and Search --> : Using forms with links <a>


nmalik
07-30-2003, 08:58 AM
Hello all,

I have a slightly out of the usual problem. My code is pure HTML without any client side scripting enabled and want to avoid using it.

My basic layout has 2 frames, the upper half for displaying results based on user selections from the lower half frame. The upper half is a table consisting of individual cells (<td>'s) each of which show some data.

I went ahead and designed this really cool interface with a set of links (in the lower frame) for the various tasks that all sit well-aligned in a table :-) . There are around 20 links and each link was meant to update the value of a particular table cell (<td>'s).

Now this is where my inexperience in HTML is highlighted. I am now trying to incorporate "forms" into my design. What I expected to do was each click in the lower frame would send back a value to the server indicating which cell's contents to update. But now I realize that links (<a>'s) are not a type of form element. I am trying to avoid creating 20 different HTML files (one for every link).

I was planning on using Server Side Includes to update values of the table. Do I need to change my links to something like radiobuttons etc to get it working or is there a way to salvage my design?

Thanks,

Nitin

pyro
07-30-2003, 09:01 AM
To be honest, I really am not sure what you are looking for, but it sounds like this (http://www.infinitypages.com/research/divinclude.php), maybe?

nmalik
07-30-2003, 09:07 AM
Sorry for not clarifying.... here is what I'm trying to do

I want the links I have in the lower frame to update the contents of the upper frame, but since each click in the lower frame only updates a particular field (table data) of the upper frame, I was hoping to use some sort of "form" to pass back to the server information about which link was selected. This way the server would dynamically update only the required field.

I know that links <a> are not a type of form element... should I convert them to button or radiobuttons and pass back the information. Is there any way to make it work without using buttons?

My other option would be to have a different page for every link and I just feel it seems as an overkill.

pyro
07-30-2003, 09:10 AM
Why not pass the value with a query string, like I did in the example I pointed you to?

nmalik
07-30-2003, 09:19 AM
Yes what you have implemented seems to do what I want.

I guess I will have to learn PHP... I was using plain old C programming to implement the server side includes...

now now, don't laugh!!

Can I pass back arguments (like the file name in your example) using a C executable.

pyro
07-30-2003, 09:23 AM
I believe using CGI scripting, you would be able to do that.