It cant be extended as theres no method to alter the caption bar. I could copy, paste and hack it, but really I didnt want to have to mess about on that level. So instead I was following the advice here; http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/2950c44985a26cdf/ad1a99c7b907c1f3?lnk=gst&q=DialogBox+close#ad1a99c7b907c1f3
On Apr 11, 2:58 pm, Vitali Lovich <vlov...@gmail.com> wrote: > Just a quick question. For such basic stuff, why are you using JSNI at > all? Just extend the widget to do what you want (or copy, paste & hack the > code from gwt). > > This all seems to be something that is perfectly fine to be within the scope > of regular code. > > > > On Sat, Apr 11, 2009 at 5:27 AM, Darkflame <darkfl...@gmail.com> wrote: > > > Just to clarify my attempted solution and why it isnt working; > > > <a href="#PostNewReview"> Post Quick Review </a> > > > Is the html produced by one of the standard Hyperlinks in GWT. This > > works fine, it triggers history, and it dosnt refresh the page in IE. > > > This however, is the html produced by my attempt at having a close "X" > > in the corner of the dialogue box clear the history token; > > > <a href="#"> > > <div class="closeimage" onclick="closeDialog()"/> > > </a> > > > This, annoyingly, cause's the page to refresh in IE. > > > Why :? > > > On Apr 10, 12:02 pm, darkflame <darkfl...@gmail.com> wrote: > > > I tried googleing for this without much success, despite the fact its > > > really more a javascript rather then GWT query, I couldnt find > > > anywhere else with an answer. > > > > Basicaly I have a gwt application which triggers a pop-up window, > > > which is an extension of DialogBox. > > > > Because I wanted a windows like "X" in the corner to close it, I > > > followed some advice and altered the titlebar of it with; > > > > this.setHTML("<div class=\"captiontext\"> - Title Here - </div><div > > > onclick=\"closeDialog()\" class=\"closeimage\" >   </ > > > div>"); > > > > redefineClose(QuickReviewPopUp); > > > > .. > > > > private native void redefineClose(DialogBox dialogBox) /*-{ > > > $wnd['closeDialog'] = function () { > > > dialogb...@com.google.gwt.user.client.ui.dialogbox::hide()(); > > > } > > > > }-*/; > > > > This works, the dialogue close's nicely. When the x is hit. > > > > However, as I'm not using a normal link to close it, I have no idea > > > how to clear the history token. > > > The historytoken is changed when the popup appears as I want the state > > > of if its open/close to be saved, but I cant work out how to set it > > > back when it closes. > > > Is there a javascript function I could put in the refdefineClose that > > > would do this? > > > > I tried using (<a href="#"></a>) around the divs in the link that > > > triggers the native javascript, but aside from looking messy,all this > > > reloads the page. > > > (at least in IE, but the normal internal hyperlinks triggering the > > > popups dont reload the page in IE, so clearly there must be some > > > difference) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---