HighDots Forums  

Re: list label

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Re: list label in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
mrichmond webforumsuser@macromedia.com
 
Posts: n/a

Default Re: list label - 07-15-2003 , 12:18 PM







You can edit the value so that it contains both, but the way an option works is that if no vaue is defined then it defaults to the label as the value, but if the value is defined then that is sent on form submission.

--Megan Richmond

Reply With Quote
  #2  
Old   
boxhead webforumsuser@macromedia.com
 
Posts: n/a

Default Re: list label - 07-16-2003 , 04:19 AM






Done it!!

here is the function i created. 'Localdd' is the list name. 'labelfield' and 'valuefield' are to invisible text fields. The information is POSTed to the server so it can then be used to create a session varriable on the same page using Request.Form


<script language="JavaScript">
function getlabel (){
var labelval = document.form1.localdd.selectedIndex;
document.form1.labelfield.value = document.form1.locdd.options[labelval].text;
document.form1.valuefield.value = document.form1.locdd.value;
document.form1.submit();
}
</script>




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.