473,386 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Link as Form submit

In the application I'm developing, I need a link to behave as a form
submit. I set up a little test example below and it worked fine:

<table>
<tr>
<form action="action1.cfm" method="POST" enablecab="No"
name="CareerActionPlanLink">
<td align="center">
<input type="Hidden" name="careerActionPlanID" value="7">
<a href="javascript:document.CareerActionPlanLink.sub mit();">Edit</a>
</td>
</form>
</tr>
</table>

Then I did it for real and it keeps throwing Javascript errors at me.
Can anyone look at the following code and give me a clue where I might
be going wrong. I'm using fusebox 2 with coldfusion which means that
the form will submit to the index.cfm file. The js error states "Object
does not support this method or property" or words to that effect.
Thank you very much.

<cfoutput query="getRecs">

<tr valign="middle" bgcolor="#IIf(CurrentRow Mod 2, DE('D7F991'),
DE('EDFDCC'))#">
<td height="28">Action Plan: #currentRow#</td>
<td>#CareerDirectionName#</td>
<td>#CompName#</td>
<td>#DateFormat(LastEdited,"mm/dd/yy")#</td>

<form action="#Request.Self#" method="POST" enablecab="No"
name="CareerActionPlanLink">
<input type="Hidden" name="careerActionPlanID"
value="#careerActionPlanID#">
<input type="Hidden" name="fuseaction" value="editCareerActionPlan">
<td align="center">
<a href="javascript:document.CareerActionPlanLink.sub mit();">Edit</a>
</td>
</form>


<td align="center"><a
href="#Request.Self#?fuseaction=deleteCareerAction Plan&careerActionPlanID=#careerActionPlanID#">Dele te</a></td>
</tr>

Jul 23 '05 #1
2 1913
Cardinal wrote:
In the application I'm developing, I need a link to behave as a form
submit.
Bad idea. If the look is so important (and it shouldn't be, the button look
tells the user that it is going to do something with the form and isn't
just a regular link, its generally a bad idea to hide that information from
the user) then you can style the button to look like a link in most
browsers.
<tr>
<form action="action1.cfm" method="POST" enablecab="No"
name="CareerActionPlanLink">
<td align="center">
http://validator.w3.org/
Then I did it for real and it keeps throwing Javascript errors at me.
Can anyone look at the following code and give me a clue where I might
be going wrong.


Its a lot easier to debug code if we can see the code causing the problem
(rather then some Cold Fusion code that when executed will generate the
HTML and JavaScript that you are having trouble with)
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #2
In article <11**********************@g14g2000cwa.googlegroups .com>,
jo*********@ceridian.com enlightened us with...
In the application I'm developing, I need a link to behave as a form
submit. I set up a little test example below and it worked fine:


A form is not a valid child element of TABLE or TR.
Validate your HTML.
The form should either enclose the table, or the form should be enclosed in
the TD. Nest your elements properly.
The html you posted is invalid and is not equivalent. The first example has
the form nested properly, but as a child of TR. The second is nested
improperly completely (missing <td>).

You're lucky the first one ever worked. Nice of MSIE to fix that for you.

<form>
<table>
<tr>
<td>
<a>link</a>
</td>
</tr>
</table>
</form>

OR

<table>
<tr>
<td>
<form>
<a>link</a>
</form>
</td>
</tr>
</table>

Pick one.

--
--
~kaeli~
A boiled egg in the morning is hard to beat.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Dodo | last post by:
Is it possible to create a link that can post a value to an ASP page without java?
1
by: Stanimir Stamenkov | last post by:
Here's an example: <form action="bogus" method="post"> <p> <a href="prev.cgi"><input type="submit" name="prev" value="< Back"></a> <a href="next.cgi"><input type="submit" name="next"...
10
by: | last post by:
Can I link to another page with a <input type=button> without javascript??? Thanks
2
by: Matt | last post by:
Can we click a link and it will submit the form to the other page? Usually we will submit the form to other page by clicking a submit button. Now I need to do the following, but what if I have...
26
by: Mica Cooper | last post by:
Hi, I need to pass some info in a javascript submit. <a href="javascript:document.formName.submit();">Submit Form</a> Normally a link would do page.jsp?x1=1&x2=2&x3=3 and you would pull x1,...
4
by: kschneider | last post by:
Assume there's a form with it's action attribute all set to post to a URL, but without a submit control. Form submission is done via a link and I want to prevent the classic "double submit"....
2
by: Gregor Horvath | last post by:
Hi, As I am no expert web programmer I thought I'd better ask the experts if there is a simpler or better solution to my problem than the one I am thinking of. (using TurboGears) The problem...
11
by: yangsuli | last post by:
i want to creat a link when somebody click the link the php script calls a function,then display itself :) i have tried <a href=<? funtion(); echo=$_server ?>text</a> but it will call the...
14
by: Wouter | last post by:
Hi, I try to make the follow. I want that i can click on a text link and that then a link wil be copyed in a input form box (<input type="text" name="img_url" />). I have google-ed about how...
10
by: pt36 | last post by:
Hi I have a page with a form and a textbox. before to submit the form I want to chek if the inserted value in the textbox is already present in a database. So I need to pass the textbox value...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.