From: Cameron H. <ca...@bi...> - 2000-11-28 18:17:30
|
Hi, I am trying to use loadpanel to firstly load a form from another html file (this works okay). The next thing I want to do is submit the form using the POST method and have the form response load back into the loadpanel. I did I test using a plain html version and I could get IE to load the form response into a named IFRAME, I didn't have any success with Netscape though. I haven't managed to get this to work using loadpanel though, loadpanel doesn't appear to name the IFRAME, and even when I tried hard coding a name in the code, IE still didn't recognise it. What I want to know is has anyone tried and succeded in doing such a thing? It seems like sending the form data using GET would work, but is it possible using POST? Thanks, Cameron. |
From: Tarun R E. <ta...@we...> - 2000-11-28 19:47:00
|
Didnt clearly understand : is it Netscape or IE or both thats giving the problem ? When faced with this kind of a situation, I usually use a different (and safer) design : I keep 2 frames : one hidden( rows and cols as zero) and the other as the main frame. When I want content to be loaded into any widget, I submit a form in the hidden frame that then retrieves the HTML content from the server into a textbox. Then I use JScript to read this textbox, and update the widget in the main frame with the contents of the textbox. Yeah! I know its a bit messy, however its more reliable, and you can abstract the details with a little bit of savvy. ----- Original Message ----- From: "Cameron Hart" <ca...@bi...> To: "Dynapi-Help (E-mail)" <dyn...@li...> Sent: Tuesday, November 28, 2000 11:51 PM Subject: [Dynapi-Help] targeting a loadpanel with a form > Hi, > > I am trying to use loadpanel to firstly load a form from another html file > (this works okay). The next thing I want to do is submit the form using the > POST method and have the form response load back into the loadpanel. I did I > test using a plain html version and I could get IE to load the form response > into a named IFRAME, I didn't have any success with Netscape though. I > haven't managed to get this to work using loadpanel though, loadpanel > doesn't appear to name the IFRAME, and even when I tried hard coding a name > in the code, IE still didn't recognise it. > > What I want to know is has anyone tried and succeded in doing such a thing? > It seems like sending the form data using GET would work, but is it possible > using POST? > > Thanks, > > Cameron. > > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-help > |
From: Cameron H. <ca...@bi...> - 2000-11-29 12:09:22
|
> Didnt clearly understand : is it Netscape or IE or both thats > giving the > problem ? Neither of them worked when using the DynAPI. I think they would both work using the get method. I tried making an example just using html, no javascript, if I set the name attribute on the iframe tag i can tell the form to target the iframe. I could get a form loaded in an iframe to load the form response into the same iframe (using post), but netscape always loaded the form repsonse into the parent window, not the ilayer. i get the impression that what I want to do is not possible in netscape 4. > I keep 2 frames : one hidden( rows and cols as zero) and the > other as the > main frame. When I want content to be loaded into any widget, > I submit a > form in the hidden frame that then retrieves the HTML content from the > server into a textbox. > Then I use JScript to read this textbox, and update the > widget in the main > frame with the contents of the textbox. So your form response returns an html page with a textbox in it to the hidden frame, and in the text box is the content you want to use to update your widget. I presume that if you are doing this then after you submit the form you run a function that checks for the existence of a textfield in the hidden frame. Is that about right? I thought about trying to use onload, but I can't see how to attach an onload event to the hidden frame without actually putting the onload function in the html that is returned by the form. > > Hi, > > > > I am trying to use loadpanel to firstly load a form from > another html file > > (this works okay). The next thing I want to do is submit > the form using > the > > POST method and have the form response load back into the > loadpanel. I did > I > > test using a plain html version and I could get IE to load the form > response > > into a named IFRAME, I didn't have any success with > Netscape though. I > > haven't managed to get this to work using loadpanel though, > loadpanel > > doesn't appear to name the IFRAME, and even when I tried > hard coding a > name > > in the code, IE still didn't recognise it. > > > > What I want to know is has anyone tried and succeded in doing such a > thing? > > It seems like sending the form data using GET would work, but is it > possible > > using POST? > > > > Thanks, > > > > Cameron. > > > > _______________________________________________ > > Dynapi-Help mailing list > > Dyn...@li... > > http://lists.sourceforge.net/mailman/listinfo/dynapi-help > > > > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-help |
From: Tarun R E. <ta...@we...> - 2000-11-30 12:01:24
|
Cameron, You are right.The document that appears in the hidden frame, will have an onLoad handler. The onLoad event handler will call a javascript function in the "main" frame once it has finished. Lets say the function that updates content from the textbox into the layer (once the textbox with new content has appeared in the hidden frame), is called updateContent(). Then the onLoad event handler of the body tag of any page put into the hidden frame will look like this : parent.frames["main"].updateContent(); What the updateContent() function (which is defined in the main frame) will do is to look up the layer name in a global variable that had asked for the change in content, and then update the content of that layer accordingly : DynAPI.document.all[layerThatRequestedContentChange] = parent.frames["buffer"].document.forms[0].<textboxName>.value; Summarising, This is what happens : When a layer wants its content to change, it will call the changeContent() function that will modify the action of the form in the hidden frame (ex bingo.asp?desiredPageName) and then submit the form. The changeContent() function then puts the name of the layer into a global variable and then exits. Once the page has finished loading in the hidden/buffer frame, its onLoad event handler will call the updateContent() function in the main frame,which will then look for the name of the layer in the main frame that requested the content change, and update its content accordingly. I hope the above is somewhat clear (and without errors), I wrote it real fast. nal Message ----- From: "Cameron Hart" <ca...@bi...> To: <dyn...@li...> Sent: Wednesday, November 29, 2000 5:43 PM Subject: RE: [Dynapi-Help] targeting a loadpanel with a form > > Didnt clearly understand : is it Netscape or IE or both thats > > giving the > > problem ? > > Neither of them worked when using the DynAPI. I think they would both work > using the get method. I tried making an example just using html, no > javascript, if I set the name attribute on the iframe tag i can tell the > form to target the iframe. I could get a form loaded in an iframe to load > the form response into the same iframe (using post), but netscape always > loaded the form repsonse into the parent window, not the ilayer. i get the > impression that what I want to do is not possible in netscape 4. > > > I keep 2 frames : one hidden( rows and cols as zero) and the > > other as the > > main frame. When I want content to be loaded into any widget, > > I submit a > > form in the hidden frame that then retrieves the HTML content from the > > server into a textbox. > > Then I use JScript to read this textbox, and update the > > widget in the main > > frame with the contents of the textbox. > > So your form response returns an html page with a textbox in it to the > hidden frame, and in the text box is the content you want to use to update > your widget. I presume that if you are doing this then after you submit the > form you run a function that checks for the existence of a textfield in the > hidden frame. Is that about right? > > I thought about trying to use onload, but I can't see how to attach an > onload event to the hidden frame without actually putting the onload > function in the html that is returned by the form. > > > > Hi, > > > > > > I am trying to use loadpanel to firstly load a form from > > another html file > > > (this works okay). The next thing I want to do is submit > > the form using > > the > > > POST method and have the form response load back into the > > loadpanel. I did > > I > > > test using a plain html version and I could get IE to load the form > > response > > > into a named IFRAME, I didn't have any success with > > Netscape though. I > > > haven't managed to get this to work using loadpanel though, > > loadpanel > > > doesn't appear to name the IFRAME, and even when I tried > > hard coding a > > name > > > in the code, IE still didn't recognise it. > > > > > > What I want to know is has anyone tried and succeded in doing such a > > thing? > > > It seems like sending the form data using GET would work, but is it > > possible > > > using POST? > > > > > > Thanks, > > > > > > Cameron. > > > > > > _______________________________________________ > > > Dynapi-Help mailing list > > > Dyn...@li... > > > http://lists.sourceforge.net/mailman/listinfo/dynapi-help > > > > > > > _______________________________________________ > > Dynapi-Help mailing list > > Dyn...@li... > > http://lists.sourceforge.net/mailman/listinfo/dynapi-help > > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-help > |