开发者

ASP LinkButton inside of JQueryUI Dialog closes it - how do I prevent that?

On my website I have it setup where when someone clicks on one of my items, a modal JQuery dialog box pops up. Works great (thanks to Stackoverflow help)! So now I dynamically create linkbuttons and imagebuttons inside the dialog, depending on what was clicked on. When I create开发者_JAVA技巧d said buttons (all server side), this is what I told them to do:

inserttext2.OnClientClick = "window.open('" + vendorurl + "')"
vendorpic.OnClientClick = "window.open('" + vendorurl + "')"

The variable vendorurl is figured out earlier, but it is the URL that will open up in a new tab/window when someone clicks on the appropriate control. When someone does click on it, it does open the new tab like its supposed to! Hooray. But! When I go back to my original tab that had the JQuery dialog open, it is now gone! How would I go about making sure the Dialog doesn't close unless someone actually clicks the little X thingy to close it?

I assume since I used the OnClientClick, then all the action would happen user-side via javascript, and not create a postback (or whatever is happening).

EDIT: In case you need to see it, the problem can be duplicated by going here: http://www.mobiuspc.com Then click on the processor tab, then click on the 5th item down which should be AMDZ940XCGIBOX. This is one I use for testing, as once you click on (just once, and don't drag it), then in the resulting dialog window it has multiple links available to click on. Not all of the items have the links, hence why I standardized to this one item for consistent tests.


Try this for the OnClientClick

"window.open('" + vendorurl + "'); return false;"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜