473,385 Members | 2,015 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,385 software developers and data experts.

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 7455
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
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...
6
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...
3
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...
2
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...
1
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...
3
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...
4
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...
0
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...
1
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
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...

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.