Forums
This topic is locked
Submit form on Cell click
Posted 09 Jun 2002 00:31:32
1
has voted
09 Jun 2002 00:31:32 Abstract Chap posted:
I have created a simple table/cell with on click & mouseover etc... for my site navigation.Can anyone tell me if it is possible to submit a form by clicking on a table cell. The code I would like to use is:
<pre id=code><font face=courier size=2 id=code> <table width="100" border="1" bordercolor="#3366CC">
<tr>
<td class="iwantahand" bgcolor="#3399FF" onMouseOver="cOn(this);" onMouseOut="cOut(this);">
<div align="center"><font size="2" face="Arial, Helvetica, sans-serif">Submit</font></div>
</td>
</tr>
</table></font id=code></pre id=code>
It may not be possible, if not any ideas creating better looking but fast loading buttons (not images).
Thanks
Stephen
Edited by - AbstractChap on 09 Jun 2002 00:33:06
Replies
Replied 09 Jun 2002 06:26:02
09 Jun 2002 06:26:02 aegis kleais replied:
I assume the code you have should work fine...just have it call a javascript function and use:
document.formname.submit();
document.formname.submit();
Replied 09 Jun 2002 08:50:41
09 Jun 2002 08:50:41 Abstract Chap replied:
Hi aegiskleais,
Thanks for that tip, is it ASP ? Perhaps I should have pointed out that I am a newbie to anything more than the basics and am using PHP.
I'm going to go have a look and see if I can get this working now <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Thanks
Stephen
Thanks for that tip, is it ASP ? Perhaps I should have pointed out that I am a newbie to anything more than the basics and am using PHP.
I'm going to go have a look and see if I can get this working now <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Thanks
Stephen
Replied 09 Jun 2002 15:38:59
09 Jun 2002 15:38:59 Matthijs Horsman replied:
it's javascript
take a look at irt.org, at the javascript faq's you can see nice examples there...
Matthijs
----------------
UD4/WY2K/IIS/ASP-VB
www.chaps.nl
take a look at irt.org, at the javascript faq's you can see nice examples there...
Matthijs
----------------
UD4/WY2K/IIS/ASP-VB
www.chaps.nl
Replied 09 Jun 2002 21:27:51
09 Jun 2002 21:27:51 aegis kleais replied:
Sorta like this...
<html>
<body>
<head>
<script language="javascript"><!--
function submitForm(){
document.form1.submit();
}
//-->
</script>
</head>
<body>
<table>
<tr>
<td onclick="javascript:submitForm()"></td>
</tr>
</table>
</body>
</html>
--------------------------------------------
See if something like that works. You may have to find some javascript code to make it NN compliant. But I hate NN. So I don't even support it in my code ><img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
<html>
<body>
<head>
<script language="javascript"><!--
function submitForm(){
document.form1.submit();
}
//-->
</script>
</head>
<body>
<table>
<tr>
<td onclick="javascript:submitForm()"></td>
</tr>
</table>
</body>
</html>
--------------------------------------------
See if something like that works. You may have to find some javascript code to make it NN compliant. But I hate NN. So I don't even support it in my code ><img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Replied 09 Jun 2002 21:48:23
09 Jun 2002 21:48:23 Matthijs Horsman replied:
I can tell you now already that NN 4.7 doesn't support the OnClick event for a TD or TR tag (tried it out my self) but NS6.2 does, the only thing is that you don't see a little hand. Work around: apply the same link to the text in the TD and your set...
Matthijs
----------------
UD4/WY2K/IIS/ASP-VB
www.chaps.nl
Matthijs
----------------
UD4/WY2K/IIS/ASP-VB
www.chaps.nl