Get ready for BLACK FRIDAY shopping starting in

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> &lt;table width="100" border="1" bordercolor="#3366CC"&gt;
&lt;tr&gt;
&lt;td class="iwantahand" bgcolor="#3399FF" onMouseOver="cOn(this);" onMouseOut="cOut(this);"&gt;
&lt;div align="center"&gt;&lt;font size="2" face="Arial, Helvetica, sans-serif"&gt;Submit&lt;/font&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</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();
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
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
Replied 09 Jun 2002 21:27:51
09 Jun 2002 21:27:51 aegis kleais replied:
Sorta like this...

&lt;html&gt;
&lt;body&gt;
&lt;head&gt;
&lt;script language="javascript"&gt;&lt;!--
function submitForm(){
document.form1.submit();
}
//--&gt;
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;table&gt;
&lt;tr&gt;
&lt;td onclick="javascript:submitForm()"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;

--------------------------------------------

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 &gt;<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

Reply to this topic