Phani, > Will it be going into a infinate loop?
This should not cause any sort of loop situation as the second request is for an "image" as far as the browser is concerned; it will not cause the browser to refresh. This will, as we've seen, potentially cause services/events to run a second time. Please note that, any POSTed request params will be missing on the second request and most likely cause this second round of services to fail. > From my experience with other > MVC projects using struts i never had a problem, does our ofbiz Architecture > have a issue with this or is it in general ? Well I think this is more of a browser/HTML issue. With the given HTML, this second request would happen regardless of any particular server-side framework. I'm not an HTML guru, but I'm not sure why one would want a blank src attribute in an image tag in the first place. We stumbled upon this as a result of bad freemarker - it was not our intention to render html like this. -Dave -----Original Message----- From: G.Venkata Phanindra [mailto:[EMAIL PROTECTED] Sent: Friday, March 09, 2007 12:30 AM To: [email protected] Subject: Re: image tag causing request to controller Hi David and Others, Will it be going into a infinate loop? From my experience with other MVC projects using struts i never had a problem, does our ofbiz Architecture have a issue with this or is it in general ? Regards Phani On 3/8/07, David Napolitan <[EMAIL PROTECTED]> wrote: > > Hi, > > I was just looking into this same problem yesterday. This is what I > found: > > As you know, you will see this problem when you have an img tag with a > blank or hashed value as the src attribute: > > <img src="#"/> or <img src=""/> > > Since the src attribute doesn't start with a protocol, the browser will > interpret this as a relative url. It appends this value (" " or "#") to > your current url when it goes to fetch this image. As a result, it > makes a request with a url matching that of your current page. .. and > you get these additional requests being made. > > I hope that helps. > > -Dave > > > > -----Original Message----- > From: Tim McGuire [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 08, 2007 10:45 AM > To: [email protected] > Subject: RE: image tag causing request to controller > > This behavior only happens when I give a blank src attribute <img > name="largeImage" src=""> > if I fill it in with garbage or delete it altogether, it works as > expected. > > > I've attached relevant portion of console.log > > the FTL file is pared down to a testing.ftl: > > <TABLE border=0 width='100%' cellspacing='0' cellpadding='0' > class='boxoutside'> > <TR> > <TD width='100%'> > <table width='100%' border='0' cellspacing='0' cellpadding='0' > class='boxtop'> > <tr> > <td width="100%"><div class="boxhead">TESTTESTTESTTESTTEST > </div></td> > > </tr> > </table> > <table width='100%' border='0' cellspacing='0' cellpadding='2' > class='boxbottom'> > <tr> > <td width="100%" align=center><div > class="tabletext">TESTTESTTEST</div></td> > </tr> > > </table> > </table> > > <div id="enlargedImage" style="display:none"> > <!--table width="55%" border=0 cellpadding=0 > cellspacing=0 class="boxbottom" --> > <table width="50%" border=0 cellpadding=0 cellspacing=0 > class="boxbottom"> > <tr> > <td> <IMG name="largeImage" SRC="" ></td> > <!-- <td ><IMG height="1754" width="1278" > name="largeImage" src=""></td> --> > </tr> > <tr><td> </td></tr> > <tr> > <td> <input type="file" name="fileName" > class="insideHeaderLink" alt="Import a file"> Add a file to this > collection</td> > </tr> > <tr><td> </td></tr> > <tr> > <td><!-- <input type="submit" > value="Upload/Finish" alt="Save the new document information"> --></td> > </tr> > </table> > > </div> > -- G.Venkata Phanindra Mob:: 9849852989
