Form submit w/ hidden fields using text only

S

sams

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!
 
L

Lee

(e-mail address removed) 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?
 
S

sams

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.
 
L

Lee

(e-mail address removed) 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.
 
D

David Dorward

Lee said:
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.
 
S

sams

David said:
That effect is more safely achieved by using a regular submit button and
some CSS to take away the borders and background colour.
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top