By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,626 Members | 1,653 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,626 IT Pros & Developers. It's quick & easy.

can submit text links pass form fields?

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.