Re: Relative paths in files retrieved by RequestBuilder
Not sure what you mean. Say you have a file foo.html referencing bar1.jpg and bar2.jpg all in the same directory. If you just use img src=bar1.jpg foo.html will load with RequestBuilder, but the image won't. Doesn't that suck? My current workaround is to use full paths for the images - that works, but it hard-codes the path. My question is: is it possible to continue to use relative paths and still load the HTML with RequestBuilder? -- 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.
Re: Relative paths in files retrieved by RequestBuilder
On Thursday, April 7, 2011 8:55:17 AM UTC+2, Sekhar Ravinutala wrote: Not sure what you mean. Say you have a file foo.html referencing bar1.jpg and bar2.jpg all in the same directory. If you just use img src=bar1.jpg foo.html will load with RequestBuilder, but the image won't. Doesn't that suck? My current workaround is to use full paths for the images - that works, but it hard-codes the path. My question is: is it possible to continue to use relative paths and still load the HTML with RequestBuilder? As long as the paths are relative to where you load the HTML snippet from (your GWT app), rather than where it lives, yes. Or you could try to rewrite all paths yourself (using a regexp to extract every href and src attribute values and rewrite them by prepending the path to the HTML snippet). (note that it has little to do with RequestBuilder or GWT actually, it's an AJAX issue). -- 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.
Re: Relative paths in files retrieved by RequestBuilder
I suggest you hunt around your deployed app and you'll find the relative path that works. It may likely be src='../../my.jpg' or something similar On Tue, Apr 5, 2011 at 5:01 PM, Sekhar Ravinutala sek...@allurefx.comwrote: I'm loading some HTML on the fly using RequestBuilder (GWT/GAE). The files load OK, but the images in the file referenced by relative paths won't load. E.g., img src=whatever.jpg won't work, but absolute path /path-to-file/whatever.jpg does. Is there way to make relative paths work when using RequestBuilder? It's not practical to use absolute paths in the files...so hope there's an easy solution. -- 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. -- -- A. Stevko === If everything seems under control, you're just not going fast enough. M. Andretti -- 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.
Relative paths in files retrieved by RequestBuilder
I'm loading some HTML on the fly using RequestBuilder (GWT/GAE). The files load OK, but the images in the file referenced by relative paths won't load. E.g., img src=whatever.jpg won't work, but absolute path /path-to-file/whatever.jpg does. Is there way to make relative paths work when using RequestBuilder? It's not practical to use absolute paths in the files...so hope there's an easy solution. -- 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.