close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Problem adding Javascript

Thread began 11/21/2011 11:36 am by glmcps295424 | Last modified 12/01/2011 1:37 pm by glmcps295424 | 1216 views | 5 replies |

glmcps295424

Problem adding Javascript

Creating 2 Dynamic drop downs with the second dependent on the first. It works perfectly if I create my own page. However if I use WA Data assist wizard to create an insert page I get an error when I try to add the onchange event using the plus buttom on the Behaviors dialog. The error comes up and the "populate list from array" is grayed out. see attached error.


thanks for your time,

Gregg

Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

Sign in to reply to this post

glmcps295424

follow up

Jason,

I've found that if I detach the page from the template I don't get the error and the menu
selection is not grayed out. As a result I was able to get it working. Hope this helps.


regards,


Gregg

Sign in to reply to this post

glmcps295424

need better understanding of the update page

Jason,

Using 2 dynamic drop downs (parent = galltype, child= category) in an insert page for file called imagefil.

The insert page works perfectly. (selecting a galltype filters the category DD

Trying to make the update page function properly

pertinent fields

parent drop down is gallid (serves as a lookup from the galltype file)

gallid and galldesc are pertinent fields




child dropdown is catid (serves as a lookup from the category file)

catid , gallid and category are the fields


have worked for two days trying different combinations to no avail.

I have read and tried many of the suggestions from various posts and your responses from this forum.

My questions are:

1. Could you explain the purpose of the dynamic Array ?
2. In one instance you state that the update page is similar to the insert, except for the body onload event where the set selected in list for the parent list and populate list from array are to be added. Does that mean the dynamic array, dynamic menu on parent and the onchange behavior on the parent select are all the same?
3. Could you explain what the purpose of the “populate list from array” and “set select in list” are and how they must relate to the dynamic array?

Note that in my insert page I added the following jquery because I don't understand the regular javascript...

var j = jQuery.noConflict();
j("select.catid").change(function () {
var str = "";
j("select.catid option:selected").each(function () {
str += j(this).text() + " ";
});
j(".category").val(str);
});

this fills a text field below the child dropdown . My display on another page required that I capture the catid and category ( the actual description field )


Thank you for your time,


Gregg

Sign in to reply to this post

Jason ByrnesWebAssist

  1. Could you explain the purpose of the dynamic Array ?  


The dynamic array is the information that is pulled from the recordset. It is a two dimensional array. it is an array of values from the parent list, with a subarray of values that will be used for the child list.

  2. In one instance you state that the update page is similar to the insert, except for the body onload event where the set selected in list for the parent list and populate list from array are to be added. Does that mean the dynamic array, dynamic menu on parent and the onchange behavior on the parent select are all the same?  




yes, they are the same dynamic array, It's just a diferance of when they are used, onChange, or onLoad:

In a regular page, you would populate the parent list, then when the parent list value is changed, use the onChange event to populate the child list from the array based on the selection that was made.

on an update page, you want to have this happen the page loads. in other words, automate the process of selecting a value in the parent list, populateing the child list from the array, then making a selection from the child list.

to accomplish this, you use the body onLoad event. The first Set Selected In list behavior automates the process of selecting a value from the parent list, the Popualte list from array behavior automates the process of populating the child list based on the selection that was made, the second set selected in list behaivor automates the process of makoing the selection in the child list.



  3. Could you explain what the purpose of the “populate list from array” and “set select in list” are and how they must relate to the dynamic array?  



the set selected in list selects an item in the parent list, it selects the item to use for populating the child list.

like i said in the first question, the dynamic array is a 2 dimensional array, the first dimension contains all the parent list values. The second dimensions contains the child list values, when a parent value is selected, the array returns the items that relate to the parent.

Sign in to reply to this post

glmcps295424

Jason,

Thank you for the explanation. I got it working. When you said 2 dimensional array a light went on and the rest was simple.

Kindest Regards,


Gregg

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...