I guess I'm getting one step closer; but still no solution to make
this work.
If I return the script:
<html>
<script>
alert('Hi');
</script>
</html>
IE 6 will run that script. Firefox 3 will not. Any thoughts?
Thanks,
Chris....
On Jun 15, 9:56 am, Chris <[email protected]> wrote:
> I quick followup. It appears the code (modified for IE) works on IE
> 6. The trouble I am having is with FireFox 3.0.10.
>
> Does any know if the code should work with FF3? Is there some
> restricted access to window.name on FF?
>
> Thanks,
> Chris....
>
> On Jun 14, 4:25 am, Chris <[email protected]> wrote:
>
> > I am trying to get a cross domain solution working using Ray
> > Cromwell's solution. Has anyone gotten this to work with GWT 1.6?
> > Any samples out there showing how it is supposed to be wired up.
>
> > I can't seem to get the post result to be available in the
> > application. When the FormPanel creates the iframe, it is
> > automatically setting the window.name of the iframe. No matter what I
> > try (see below) the only value I am getting in my:
> > form.addSubmitCompleteHandler(new FormPanel.SubmitCompleteHandler(){
> > public void onSubmitComplete(SubmitCompleteEvent event){
> > Window.alert("return:" + event.getResults());
> > }
>
> > });
>
> > Is the preset iframe window.name. Something like FormaPanel_1.
>
> > I've tried having the servlet on the cross domain return variations
> > of:
> > <script>...</script>
> > <html><script>...</script></html>
> > <html><head><script>...</script><head></html>
>
> > Any ideas on what I could be doing wrong?
>
> > The two reference articles I have been
> > using:http://timepedia.blogspot.com/2008/07/cross-domain-formpanel-submissi...
>
> > Thanks,
> > Chris.....
>
> > My sample code:
>
> > public class Zwidget2 implements EntryPoint{
> > FormPanel form;
> > public void onModuleLoad(){
> > final Button sendButton = new Button("Send To Cross Domain");
>
> > RootPanel.get("btn4").add(sendButton);
>
> > class MySendHandler implements ClickHandler{
> > public void onClick(ClickEvent event){
> > if(form != null) {
> > RootPanel.get("form1").remove(form);
> > }
> > form = new FormPanel();
>
> > form.setAction("http://crossdomain.com/zwidget2/greet2");
> > form.setMethod(FormPanel.METHOD_POST);
>
> > Hidden h = new Hidden();
> > h.setValue(variable());
> > h.setName("inputvalue");
> > form.add(h);
>
> > form.addSubmitHandler(new FormPanel.SubmitHandler(){
> > public void onSubmit(SubmitEvent event){
> > Window.alert("submit form with value[" + variable()
> > + "] to url[" + form.getAction() + "]");
> > }
> > });
> > form.addSubmitCompleteHandler(new
> > FormPanel.SubmitCompleteHandler(){
> > public void onSubmitComplete(SubmitCompleteEvent event)
> > {
> > Window.alert("return:" + event.getResults());
> > }
> > });
>
> > RootPanel.get("form1").add(form); //form needs to be
> > attached to send
>
> > DeferredCommand.addCommand(new Command(){
> > public void execute(){
> > Window.alert("submit");
> > form.submit();
> > }
> > });
> > }
> > }
>
> > sendButton.addClickHandler(new MySendHandler());
> > }
>
> > public native String variable()/*-{
> > return $wnd.__myVariable; //set by another javascript script
> > }-*/;
>
> > }
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---