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

Form submit w/ hidden fields using text only

P: n/a
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 take the place of the following standard submit
button:

<form action="ProductQuery.cfm" name="LineCode" method="post">
<input type="hidden" name="Year" value="#GetProducts.Year#">
<input type="hidden" name="Make" value="#GetProducts.Make#">
<input type="hidden" name="Model" value="#GetProducts.Model#">
<input type="hidden" name="Model" value="#GetProducts.Model#">
<input name="SubmitVehicle" type="submit" value="Submit">
</form>

Any ideas?

Thanks!

Jul 23 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Lee
sa**@centric.net said:

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 take the place of the following standard submit
button:

<form action="ProductQuery.cfm" name="LineCode" method="post">
<input type="hidden" name="Year" value="#GetProducts.Year#">
<input type="hidden" name="Make" value="#GetProducts.Make#">
<input type="hidden" name="Model" value="#GetProducts.Model#">
<input type="hidden" name="Model" value="#GetProducts.Model#">
<input name="SubmitVehicle" type="submit" value="Submit">
</form>

Any ideas?


1. Javascript has nothing at all to do with Java.
2. As far as I know, neither HTML nor either of these languages
has any feature called a "text/java style submit form".

What, exactly, do you want?

Jul 23 '05 #2

P: n/a
Sorry, I didn't explain too well...
I just need a "text only" submit form. No buttons, just text. It also
needs to pass some variables over with the hidden fields. If it's
possible, that would be great. I've seen it done with Javascript, but I
don't know how to set up the hidden fields.

Jul 23 '05 #3

P: n/a
Lee
sa**@centric.net said:

Sorry, I didn't explain too well...
I just need a "text only" submit form. No buttons, just text. It also
needs to pass some variables over with the hidden fields. If it's
possible, that would be great. I've seen it done with Javascript, but I
don't know how to set up the hidden fields.

What you're asking for is a form that is submitted via an onclick
event of a link (usually).

The hidden fields are exactly the same. The only difference is that
you get rid of the Submit button, and use a link, instead:

<a href="whyIwontAllowYouToSubmit.html"
onclick="document.forms['LineCode'].submit();return false">Click
to Submit</a>

The URL in the HREF attribute is to a page where you explain why
you have chosen not to allow people without Javascript enabled to
use this form.

Jul 23 '05 #4

P: n/a
Lee wrote:
What you're asking for is a form that is submitted via an onclick
event of a link (usually).


That effect is more safely achieved by using a regular submit button and
some CSS to take away the borders and background colour.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #5

P: n/a

David Dorward wrote:
Lee wrote:
What you're asking for is a form that is submitted via an onclick
event of a link (usually).
That effect is more safely achieved by using a regular submit button

and some CSS to take away the borders and background colour.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/> Home is where the ~/.bashrc is


David,

Your suggestion of using CSS worked exactly as I wanted. In case anyone
is interested, the following "Submit Button" looks like a standard text
link. I was able to tweek it so it actually looks the same in IE
Explorer, Netscape and Opera.

<INPUT TYPE="SUBMIT"
VALUE="More Products"
STYLE="
font-family:Arial;
font-size:12px;
color:blue;
background:white;
width:8em;
border:Thin Dotted White;
">

You can also add some text decoration, but that produces different
results in the three browsers I mentioned.

Jul 23 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.