FORUMS: list search recent posts

Setting form values without a drop down

COW Forums : Web Design

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
tumblemonster
Setting form values without a drop down
on Sep 7, 2005 at 4:54:24 pm

I am building a web site that allows a user to click on a button to change the fabrics shown in an image of a clothing item. This allows the user to see what their custom designed clothing looks like before they purchase it. I am show/hiding floating layers containing various fabrics to create the effect. What I need to do is set the values that would normally be in a popup menu. I want them set on the buttons click, so when the submit button is pressed it reads these values.

Anyone have an idea?

-tm



Return to posts index

Curtis Thompson
Re: Setting form values without a drop down
on Sep 7, 2005 at 5:05:00 pm

hello...

not really following you perfectly - do you want to set the values of a popup dynamically? so like clear the current values and create new options in it? or did you just want to provide values for form elements?

sitruc


Return to posts index

tumblemonster
Re: Setting form values without a drop down
on Sep 7, 2005 at 6:39:26 pm

I just want to provide values for form elements.

-Jason



Return to posts index


Curtis Thompson
Re: Setting form values without a drop down
on Sep 7, 2005 at 6:46:08 pm

hello...

then something like this should work (a very simple example):


<SCRIPT LANGUAGE="JavaScript">
<--

function setValues (formEl, val) {
formEl.value = val;
}

//-->
</SCRIPT>

with formEl being the form object (so like document.myForm.myValue). then trigger that somehow - with an onClick on a button or something like that - then you can also customize it to set select values or other text field values as needed.

still not sure what type of field you want to set a value for, so for now i'll assume hiddens...but if this is too general an example, then you might find more what you're looking for here:

http://irt.org/script/form.htm

or feel free to ask me to clarify!

sitruc




Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]