Help, Semi Succeful DropDown Menu Script!

Hi All,
I've semi successfully created a dropdown menu selection script on this website however it's not showing a 2nd option when I run my script. Thanks for taking a look at this complicated code.

Here is one which works when I select the webpage using a mouse

and here is one with my Script

My Code:

Web Inspector shows this

The Vimeo links are 404

I’ve set it up as private. I’ve now set the Vimeo to anyone.

thanks for mentioning it.

Hey Paul,

The first vid link still 404s.

The second vid is viewable, but it goes by too fast to register what you did…


Crap! OK Will try another server. Re: 2nd Link. It’s only 2 frames I think so I’ll make a longer one

Using the Mouse to Select Drop Down Menu:

2nd Screen with my code:

Hey Paul,

These webpage puzzles are nearly impossible to solve without being able to test.

Is that page public?


Bugger… No not public. I’ll signup a library test account and see and PM it to you…


Is it possible to post the HTML/Java Script Code here instead?

I’ve just setup a page for you guys to take a look in Safari Archive.!Dd0W0QTZ!ZF9zeAbxeILps_O-RgwbmtAuCtD33r3nX9HiNA_7ITg



Hey Paul,

That thing is encrypted...

Nevertheless — the item you PM'd me worked.

Try this:

Select WebPage Pop-Up Menu Value and Activate OnChange() function.kmmacros (6.7 KB)

This was pesky to figure out, and I'm sure it can be simplified — but I don't have time right now.


1 Like

I’m an amateur when it comes to stuff like that.

2nd try with key. Thanks for pointing out for me.!Dd0W0QTZ!ZF9zeAbxeILps_O-RgwbmtAuCtD33r3nX9HiNA_7ITg

Hey Paul,

No worries. We're all amateurs to begin with.  :wink:

Appended is another try at the macro.

As you can see the JavaScript is simpler, although this simplicity makes it more fragile than the previous macro. This is because it depends upon the position of the item to be selected in the menu, whereas the original looked for the text of the menu item.

It's unlikely the text label will change in future, but it's less unlikely that its position in the menu will change.

This is easy enough to test for and work with though.

As you can see I've also added a Focus Safari Field action, so the focus on the page is left on the Announcement Sub-type field.

It helps to have coffee and not be in a hurry.  :smile:


Select WebPage Pop-Up Menu Value and Activate OnChange() function v1.01 copy.kmmacros (6.7 KB)

A post was split to a new topic: Need Help with Using KM Variables in JavaScript