Webmastersite.net
Register Log In

Select field reverts to field

Comments on Select field reverts to field

befeleme
Experienced

Usergroup: Customer
Joined: Aug 27, 2005
Location: Czech Republic

Total Topics: 48
Total Comments: 82
Posted Feb 13, 2006 - 11:21 AM:

Hallo Paul,

I have problem suchlike in this thread : https://www.webmastersite.net/forums/thread/6022.

This code in edit.tpl works correct (newselect is new add linkfield):

<select name="newselect"><option value="1">yes</option><option value="2">no</option></select>


but if i use this codes:

<select name="newselect" multiple><option value="1">yes</option><option value="2">no</option></select>


or

<select name="newselect" size="2"><option value="1">yes</option><option value="2">no</option></select>


or

<select name="newselect" onclick=CountPrice(this.form);><option value="1">yes</option><option value="2">no</option></select>


etc.

and when I select option no (value=2), click edit button and I don't fill all required fields, edit page redirect to back and select reverted to option yes(value=1). I have the same problem when I edit link suchlike in this https://www.webmastersite.net/forums/thread/6022

Thanks for Your help.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Feb 14, 2006 - 12:58 AM:

<select name="newselect" multiple><option value="1">yes</option><option value="2">no</option></select>


is simply bad HTML. You can't pass a multiselector's value with a string, you have to use an array, hence how the script properly adds the html when you use the add fields page.

<select name="newselect" onclick=CountPrice(this.form);><option value="1">yes</option><option value="2">no</option></select>


The onclick code there is unsupported, yes. Changed to support such extra html in 3.3.7.
befeleme
Experienced

Usergroup: Customer
Joined: Aug 27, 2005
Location: Czech Republic

Total Topics: 48
Total Comments: 82
Posted Feb 14, 2006 - 2:01 AM:

Thank You Paul,

Your support is very quick and high-quality. Thank you very much, using javascript is o.k.

B.

Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.