473,387 Members | 1,611 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,387 software developers and data experts.

can submit text links pass form fields?

M
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:

<form name="movwizform">

<script language="javascript" type="text/javascript">
<!--
function getmovWiz ( selectedtype )
{
document.movwizform.supporttype.value = selectedtype ;
document.movwizform.submit() ;
}
-->
</script>

<a href="javascript:getmovWiz('step1')">step 1 - details</a>
<a href="javascript:getmovWiz('step2')">step 2 - cast</a>

</form>
THANKS!!
Jul 23 '05 #1
3 1897
In article <bd********************@comcast.com>, "M" <m@m.com> wrote:
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.


What's wrong with buttons? They work.

Folks uses other pages than yours. They know that to complete a form
that they need to press a buttons. To use a link, would confuse them.
Use the submit() function to submit the form.

document.movwizform.submit()
Jul 23 '05 #2
M
actually i answered my own question in the post. i just wasnt thinking
clearly, a hidden form field with the name 'supporttype' passes the data i
need.

i dont want buttons, becuase using tabs instead is more user friendly and it
looks a WHOLE lot better. a submit button will be used when the data is
actually submited for entry. thanks for your input though.

"Robert" <rc*******@my-deja.com> wrote in message
news:rc*****************************@individual.ne t...
In article <bd********************@comcast.com>, "M" <m@m.com> wrote:
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.


What's wrong with buttons? They work.

Folks uses other pages than yours. They know that to complete a form
that they need to press a buttons. To use a link, would confuse them.
Use the submit() function to submit the form.

document.movwizform.submit()

Jul 23 '05 #3
M wrote:
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.
Why use a form? Why not use anchors and plain URLs? No
javascript needed (or even a form).

[...] <form name="movwizform">
An action is required, even if it's action="" - though I think
your use of a form is completely unnecessary.

<script language="javascript" type="text/javascript">
The language attribute is depreciated and replaced by type.
<!--
No need to hide scripts.
function getmovWiz ( selectedtype )
{
document.movwizform.supporttype.value = selectedtype ;
document.movwizform.submit() ;
}
-->
</script>

<a href="javascript:getmovWiz('step1')">step 1 - details</a>


No need for "javascript:...". This "link" will be totally
inoperative for anyone with JavaScript disabled. Consider:

<a href="help.html#step1_details" onclick="
getmovWiz('step1'); return false;">step 1 - details</a>

At least then someone without JavaScript will still be sent
somewhere useful - return false will cancel the navigation if JS
is enabled.

[...]

You could also consider using frames, with your links in a left
pane and document contents in the main part of the window.
--
Rob
Jul 23 '05 #4

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

Similar topics

4
by: Eric | last post by:
Hey Everyone.. I have a form that has approximately 7 text fields and 1 checkbox. Generally when this form is submitted(to itself BTW) it works fine, however, when the checkbox is only field...
10
by: bnmm | last post by:
Hello, I'd like to style a submit button as regular text link. demo: www.byteshift.de/msg/div/input-as-link-by-css (XHTML strict) I applied "display:inline; margin:0; padding:0;" to both the...
5
by: sams | last post by:
I've seen this covered before, but I just don't understand Java very well. I apologize if this is a repeat. Basically, I need a text/java style submit form with multiple hidden fields. It would...
4
by: karenmiddleol | last post by:
I have the following form the user enters the From and to period and presses the Submit button and the form fields are cleared once the submit button is pressed. Is there a way I can keep the...
5
by: Codeman II | last post by:
Hi there, I am building a form where the user must upload a picture and fill in his details. Now I have a problem as all of this is on the same form. How will I be able to have the Browse...
5
by: Alex Maghen | last post by:
In ASPX 2.0 with MasterPages and all that, my entire page only has one actual <FORM>. But there are several different sections of the page that provide what are functionally separate forms with...
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,...
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...
11
by: V S Rawat | last post by:
using Javascript, I am opening a web-based url in a popup window. MyWin1=Window.Open(url, "mywindow") There is a form (form1) in the url in that popup window, I need to submit that form. ...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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
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,...
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.