473,626 Members | 3,369 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="CareerAct ionPlanLink">
<td align="center">
<input type="Hidden" name="careerAct ionPlanID" value="7">
<a href="javascrip t:document.Care erActionPlanLin k.submit();">Ed it</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(C urrentRow Mod 2, DE('D7F991'),
DE('EDFDCC'))#" >
<td height="28">Act ion Plan: #currentRow#</td>
<td>#CareerDire ctionName#</td>
<td>#CompName #</td>
<td>#DateFormat (LastEdited,"mm/dd/yy")#</td>

<form action="#Reques t.Self#" method="POST" enablecab="No"
name="CareerAct ionPlanLink">
<input type="Hidden" name="careerAct ionPlanID"
value="#careerA ctionPlanID#">
<input type="Hidden" name="fuseactio n" value="editCare erActionPlan">
<td align="center">
<a href="javascrip t:document.Care erActionPlanLin k.submit();">Ed it</a>
</td>
</form>


<td align="center"> <a
href="#Request. Self#?fuseactio n=deleteCareerA ctionPlan&caree rActionPlanID=# careerActionPla nID#">Delete</a></td>
</tr>

Jul 23 '05 #1
2 1931
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="CareerAct ionPlanLink">
<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************ **********@g14g 2000cwa.googleg roups.com>,
jo*********@cer idian.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
2176
by: Dodo | last post by:
Is it possible to create a link that can post a value to an ASP page without java?
1
8321
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" value="Next >"></a> </p> </form>
10
100481
by: | last post by:
Can I link to another page with a <input type=button> without javascript??? Thanks
2
2083
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 many data in the form? Any workarounds? <a href="http://myserver/index.jsp?name=test&actionType=test" target="_blank">Add New Document</a> Please advise. thanks!!
26
2901
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, x2, x3. I have no clue how to do this with a link submit. Thanks,
4
2720
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". Ignoring the server side of things, does anyone see any holes with the following script? It seems to work, but I'd appreciate other eyes on it. Maybe a try/catch/finally wrapper of some sort to be sure the link is re-enabled in the face of an...
2
1342
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 ----------- I have a form. Ok. you can submit, validate it etc.
11
11522
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 function whether i click the link then i tried this (using forms)
14
3266
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 i can make this but i cant find a explane how i can do this. I'm sure my javascript skills are the problem.... Is there here someone who can help me whit this ?
10
21525
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 by a javascript link to another page to check. my code is <a href="javascript:location.href='page_check.php' "Go check </a> and this work and open page_check.php
0
8265
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8705
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8637
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8364
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8504
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6125
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5574
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4092
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2625
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.