href of selectItemPickerIcon

Hi,

I build a drop-down list using DynamicForm.
How can I change href of selectItemPickerIcon (the arrow next to list) from “#” to “javascript:void()”?

Here is a code sample:

isc.DynamicForm.create({
    width: 500,
    fields: [{
        name: "shipTo", title: "Ship to", type: "select",
        valueMap: {
            "US" : "US",
            "SP" : "Spain"
        },
    }]
});

thank you

What are you trying to do exactly? You don’t want the select box to open when the picker icon is clicked on?

I use smartGWT component in a big application, and I cant use href=“#” there. A click on href=“#” (in arrow icon) makes a form submit.
I want to change it to href=“javascript:void()” - to make it act like an empty link

Clicking on the picker icon does not do a form submit or page transition. You must have some other code that is doing that.

Any link with href=“#” refreshes the page, and I cannot change it.
Is there a way to update the picker icon href?

Please think about what you’re saying :slight_smile: If this was actually the case the SmartGWT showcase and all samples would simply be broken, they would be doing page transitions all over the place. Again, something is wrong in your particular environment.

We both agree that its a restriction of my application, but I’m afraid that I can’t change it.

Can I extend or customize the SmartGWT selectItemPickerItem - to change its href?

Notice that updating it from href=“#” to href=“javascript:void()” will not change its functionality, but will solve my problem.

thank you

Not sure how to rephrase to make this clear - this is not a SmartGWT problem. You have something in your application which causes a page transition on this click. This does not happen normally with SmartGWT or the many other frameworks that use similar techniques. You are “barking up the wrong tree” as they say and you need to look at what part of your application is somehow reloading the page when that icon is clicked on.

Might be easiest if you post a standalone SmartGWT testcase so that there’s no confusion in what you’re trying to explain.

Sanjiv