473,750 Members | 2,616 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Submit a form using anchors?

I think I probably know that answer, but I will ask anyway.
Is it possible to submit a form using a standard anchor link, rather
than a submit button?

The reason I ask is that I have a standard form, but I want links to
enable to user to add additional data for each section if they desire.
In order for what they have already typed in to be preserved, I need to
submit the form data when one of these links is clicked. This is fairly
straightforward in Javascript, but I want to add non JS support too.

I suspect this is not possible, so I will have to think of another
design in this case, but thought I would check. And before you ask, no
it is not possible to put all the information on the one form, and it
would be highly redundant in most cases to present it as a straight
series of forms :-(
Thanks

Nov 8 '06 #1
4 7469
li************@ hotmail.com wrote:
I think I probably know that answer, but I will ask anyway.
Is it possible to submit a form using a standard anchor link, rather
than a submit button?
Using Javascript.
>
The reason I ask is that I have a standard form, but I want links to
enable to user to add additional data for each section if they desire.
In order for what they have already typed in to be preserved, I need to
submit the form data when one of these links is clicked. This is fairly
straightforward in Javascript, but I want to add non JS support too.
Try reorganizing your form. Each section is a separate page. If a
section might be inapplicable, you can have two buttons: Submit and Skip
This Section.
Nov 8 '06 #2
Another option is to load all form on one page, but hide some of it's
part that are redundant to most users. Having links like "customize
section ``C''" just showing hidden portions of the form. Such solution
is faster for a user, but if you want you site to work without
javascript to than it's not an option.

Maybe you can have buttons to look like links and do the work you want.

Nov 9 '06 #3

li************@ hotmail.com wrote:
Is it possible to submit a form using a standard anchor link, rather
than a submit button?
No - unless you use scripting.

Easiest fix is to keep the standard form submission, but use CSS to
style the submit to look however you want - such as like a simple link.

Nov 9 '06 #4

li************@ hotmail.com wrote:
I think I probably know that answer, but I will ask anyway.
Is it possible to submit a form using a standard anchor link, rather
than a submit button?

The reason I ask is that I have a standard form, but I want links to
enable to user to add additional data for each section if they desire.
In order for what they have already typed in to be preserved, I need to
submit the form data when one of these links is clicked. This is fairly
straightforward in Javascript, but I want to add non JS support too.

I suspect this is not possible, so I will have to think of another
design in this case, but thought I would check. And before you ask, no
it is not possible to put all the information on the one form, and it
would be highly redundant in most cases to present it as a straight
series of forms :-(
Thanks
Dear sir,
You can either end up using scripting such as JavaScript to
automatically make the extra sections appear by clicking the link, and
changing the link to make it submit, or you can make yourself
completely rewrite the page dynamically with a server-side language.
The first method is the easiest, although it might not work with
everyone's browser.

I have the honor to remain your most humble and Ob't Sv't in our war
against the King.

--
Patrick Reilly
1st Coy.
Colonel Seth Warner's Regiment

Nov 9 '06 #5

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

Similar topics

7
4282
by: Niall Linden | last post by:
i have a form with lots of data, and when they click on a button it calls some javascript which sets values in hidden fields then posts to itself (usual stuff) now the problem is that i would like to bring the page back to the same spot after the submit (as its very long) Ive added anchors to each button but if i add a the anchor tag to the action part of the form, im always one click behind, ie it jumps to the one I clicked on...
6
2930
by: Ramon M. Felciano | last post by:
Helo all -- I'm trying to gain a deeper understand for what type of semi-declarative programming can be done through XML and XPath/XSLT. I'm looking at graph processing problems as a testbed for this, and came across a problem that I haven't been able to solve elegantly. The problem is to find "linker" vertexes that a pair of verteces from a pre-defined set. For example, if the graph verteces represent cities and edges represent flights...
3
4992
by: Robert Mark Bram | last post by:
Hi All! Let's say I have a form like this: <form action="handler.asp"> ... </form> Within handler.asp, I output a number of named anchors: <a name="important1">Important 1</a> ... <a name="important2">Important 2</a> ...
2
1621
by: mlv2312 | last post by:
Hi, I have experienced problems when dealing with nested anchors. I implemented some code to perform highlighting and specific anchors are used for the searched words. The problem is when the searched words are inside <a href> tags, the links are lost after putting my anchors. For example: <a class="Programa" href="#" OnClick="window.open('/something.tif');"
1
2031
by: mlv2312 | last post by:
Hi, I have experienced problems when dealing with nested anchors. I implemented some code to perform highlighting and specific anchors are used for the searched words. The problem is when the searched words are inside <a href> tags, the links are lost after putting my anchors. For example: <a class="Programa" href="#" OnClick="window.open('/something.tif');"
3
1926
by: M | last post by:
i am using submit buttons to send the user to different parts of a wizard. i am using if (if attribute.step1 exists) statements to send them to the appropriate section based on which submit button they pressed. well i would like to change these submit buttons into text links instead. however they do not pass form parameters like the submit button. any simple ways to accomplish this? this is what i have so far:
4
5833
by: ThunderMusic | last post by:
Hi, I have a custom form that works fine when I debug it or run it in release mode but cannot be loaded in the designer... Actually, it can be loaded in the designer when no control is on it, but the resizing tool (in the designer) is offset both horizontally and vertically and when I put a control on it, as soon as I save, the designer throws an exception (but cannot be reproduced everytime) and the form cannot be loaded anymore unless...
0
2532
by: KJ | last post by:
Rather than ask a question, I'm going to offer something here which you may find useful. If you're like me, you want the end-user to know that data is being loaded from the server. The javascript function below adds a simple cursor change to href for the callback which initiates the server-side TreeNodePopulate event. Unfortunately, it's not perfect. You have to have a rough estimate as to how long the method call will take (I chose 4...
1
10824
by: gbezas | last post by:
Hi All, I have added an event handler to redirect form.submit() to a newSubmit() method that I have defined (which does some additional processing before submitting the form). Additionally I have defined the relavant function method in the code for details) The issue is that when Icall targetForm._submit() method from the newSubmit() function the page I get an 'Object doesn't support this property or method' error I am using IE...
0
9000
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
8838
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9577
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
9396
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...
0
8260
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6804
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
6081
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
4887
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2804
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.