close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Problem with onchange

Thread began 11/06/2009 1:36 pm by stefano391544 | Last modified 11/10/2009 11:03 am by Jason Byrnes | 3548 views | 5 replies |

stefano391544

Problem with onchange

Hi everybody

i have 4 select .

Select1
Select2
Select3
Select4

select1 populate select2
select2 populate select3
select3 populate select4

All works great but when i have alla my selects popolated if i select a value in the select1 only the selct2 re-populate and Select3 and select4 display a wrong value because they don't repopulate

If i reselect a value in the select1 all other select must close to permit a repopulate from the first select

Is there a solution?
thanks for help

Sorry for my bad english ;)

Sign in to reply to this post

Jason ByrnesWebAssist

You need to add a Populate List From Array behavior and Set Selected In List behavior for each child list to the onLoad event of the body tag.

Sign in to reply to this post

stefano391544

I try this but don't work :(

<body
onload=" WA_setSelectionsInChildList(MM_findObj('country'),MM_findObj('state'),0,0,false,': ')"

onload=" WA_setSelectionsInChildList(MM_findObj('state'),MM_findObj('city'),0,0,false,': ')"
>

any help?

Sign in to reply to this post

Jason ByrnesWebAssist

You can only have one onload statement:
<body
onload=" WA_setSelectionsInChildList(MM_findObj('country'), MM_findObj('state'),0,0,false,': ');WA_setSelectionsInChildList(MM_findObj('state'),MM _findObj('city'),0,0,false,': ')">


In addition to the Set Selected in List, you also need to add the Populate list from array behaviors to the onload event.

Sign in to reply to this post

stefano391544

Sorry Jason but for me don't work :(

this is my body tag

<body onload=" WA_setSelectionsInChildList(rst_stati2_WAJA,MM_findObj('select'),MM_findObj('country'),0,0,false,': ');WA_setSelectionsInChildList(MM_findObj('country'), MM_findObj('state'),0,0,false,': ');WA_setSelectionsInChildList(MM_findObj('state') ,MM _findObj('city'),0,0,false,': ');WA_FilterAndPopulateSubList(rst_stati2_WAJA,MM_findObj('select'),MM_findObj('country'),0,0,false,': ');WA_FilterAndPopulateSubList(rst_regioni_WAJA,MM_findObj('country'),MM_findObj('state'),0,0,false,': ');WA_FilterAndPopulateSubList(rst_provincie_WAJA,MM_findObj('state'),MM_findObj('city'),0,0,false,': ')">


my select are
1) select (populate country)
2) country (populate state)
3) state (populate city)
4) city



if i choose all the select all work great but if i re-select a country this re-populate only state and city display old wrong city.


Thanks so much for your help ;)

Sign in to reply to this post

Jason ByrnesWebAssist

You need to add populate list from array behaviors for the city to the onchange event of the country list to reset the city list to nothing.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...