[Pro] Form List - Rollover

JavaScript is case-sensitive and very, very, fussy about names. Check to be sure that you have done all of the following:

  1. Used the Item/Extended dialog to add an ID to the picking list.
  2. Set the Value for each of the picking list options to be precisely the same (letters/case) as the ID of the image you want it to control.
  3. You have set the Name attribute (in the third tab from the left of the Inspector) for your picking list control to be exactly the same as the ID.
  4. You have replaced the placeholder name ‘myPicker’ in the JavaScript with the actual name and ID of the picker on your page.

The fact that you got the images to all hide except the first instance means that you got the IDs of your images correct in the first line of the script. But all the rest of the script needs to be policed to ensure that everything is wired up correctly.

Walter

On Nov 24, 2011, at 6:49 AM, mphiggins wrote:

Thanks David. Using the javascript Walter provided, I got as far as getting all the images to hide except the first item in the list. Then clicking anywhere on the picker makes all the images disappear. If I reload the page, the first image re-appears. Puzzling.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks for your reply Walter. When I have the picker selected, and choose Item/Extended, I get a dialog box that gives me the option to edit and add a Name and Value. In your reply, does Name=ID? I’ve been very careful to copy & paste to avoid javascript errors regarding names & case sensitivity. Because all but the first are hidden when the page loads, I assume #2 in your reply is okay. #3: I’ve replaced all instances of myPicker with xxPicker - in the script and in the 3rd from left inspector tab. Any ideas?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Walter: Found the problem. I had originally put xxPicker as the Title in the properties tab of the inspector. That will cause the example to fail - thanks for your help!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

ID should literally be id (lower-case) but that shouldn’t affect anything because the browser will silently correct it. Best to make it lower-case, though. So if you were adding the ‘id’ attribute to the select element (and you have to check to be sure that the tab is chosen in the top of the Item / Extended dialog) then you would enter this:

  • Name: id
  • Value: yourIdGoesHere

yourIdGoesHere should be exactly the same as the Name attribute that you set on your select (picking list) using the Inspector (in the third tab from the left).

Walter

On Nov 25, 2011, at 12:44 PM, mphiggins wrote:

Thanks for your reply Walter. When I have the picker selected, and choose Item/Extended, I get a dialog box that gives me the option to edit and add a Name and Value. In your reply, does Name=ID? I’ve been very careful to copy & paste to avoid javascript errors regarding names & case sensitivity. Because all but the first are hidden when the page loads, I assume #2 in your reply is okay. #3: I’ve replaced all instances of myPicker with xxPicker - in the script and in the 3rd from left inspector tab. Any ideas?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options