Jump to content
  • 0

Вопрос по <Select> и <Option>


Nadrill
 Share

Question

Очень важный для меня вопрос. Очень прошу помочь.

Есть выпадающий список:

<select size="3" name="select_01">

<option value="100">Черепица 01</option>

<option value="200">Черепица 02</option>

</select></p>

Есть кнопка отправки:

<input type="submit" value="Отправить">

Необходимо, чтобы при отправке на почту приходило не значение поля value="100", а текст в списке: "Черепица 01".

Если такое невозможно, то хотя бы чтобы имя вида "Черепица 01" передавалась в текстовое поле, я уже из него буду отправлять.

Огромное спасибо всем кто откликнется на мою проблему!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

1. Попробуй так

<option value="Черепица 01">Черепица 01</option>

Если так сделать не возможно, то

2.


<input type="hidden" name="select__01">
<select size="3" name="select_01">
<option value="100">Черепица 01</option>
<option value="200">Черепица 02</option>
</select>
<input type="submit" value="Отправить" onclick="var obj=document.all.select_01; if(obj.selectedIndex >= 0) document.all.select__01.value = obj.options[obj.selectedIndex].innerHTML;">

Link to comment
Share on other sites

  • 0

Спасибо!

Вопрос - не приходит что-то. Может стоит указать переменную которая отсылается?

Спасибо!

Вопрос - не приходит что-то. Может стоит указать переменную которая отсылается?

Заработало! =) СПАСИБО ОГРОМНОЕ КОМРАД!

Edited by Nadrill
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy