...or you can call after the ajax response dojo.html.insertCssText(cssStr, doc)
On 7/17/07, Andrea Chiumenti <[EMAIL PROTECTED]> wrote:
Ahh ok, then use: var box = dojo.html.getContentBox(HTMLElement) use the box values box.width and box.height to perform an ajax call through a tapestry service (better to do on page finish load so that you'll perform a single call, and do it in json). When you receive the message back, then you can set the background image for every image you want. Ciao, kiuma On 7/16/07, Ken nashua <[EMAIL PROTECTED]> wrote: > Thanks kiuma > .... > > The problem is not the sessionid... but I will retain that solution for > future. > > The problem is background image being declared at css level. It is > purely a > "suggested" declaration... > > Therefore, no geometry mgt functionality is available... future css > releases > said it might be supported. > > I can't wait. > > I need to come up with script to perform the dom level resize of the > image. > > You seem to have a good handle on injectable javascript. > > What could I put in there to perform the resize? It seems like a new > syntax. > Your stuff is fairly deep. > > I attached my widget. Any ideas? > > Best regards > Ken in nashua > > > > ----Original Message Follows---- > From: "Ken nashua" <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED], users@tapestry.apache.org > Subject: RE: css overrides (ie6, ie7,firefox) ? > Date: Mon, 16 Jul 2007 14:57:20 -0400 > > Well it seems apparent that I need to calibrate this with some client > side > javascript. > > I added this... to my component jwc file > > <inject property="script" type="script" object="CustomHead.script"/> > > But I am unsure what to put here... > > <?xml version="1.0"?> > <!DOCTYPE script PUBLIC > "-//Apache Software Foundation//Tapestry Script Specification > 4.0//EN" > " http://jakarta.apache.org/tapestry/dtd/Script_4_0.dtd"> > <script> > > </script> > > All I want to do is find the header and stretch it to what it's box or > div > should be. I am not sure if it is a box or div or container of some > sort... > maybe element? > > Does anyone have a snippet to offer? I would believe this should be > performed during onLoad of body. > > Something to this effect? > > <script> > window.onload = calibrateGeometry (...) > > function calibrateGeometry(...) { > var widgetId = getElementById(...) > var boxId = widgetId.getParent(...) > > set width/height of widget to box > > ? > } > </script> > > Best regards > Ken in nashua > > > > ----Original Message Follows---- > From: "Ken nashua" <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED], users@tapestry.apache.org > Subject: RE: css overrides (ie6, ie7,firefox) ? > Date: Mon, 16 Jul 2007 14:45:15 -0400 > > Here is the latest markup generated. > > <!-- Application: trails --> > <!-- Page: Home --> > <!-- Generated: Mon Jul 16 14:43:36 EDT 2007 --> > <html doctype="" renderContentType="false"> > <head> > <meta name="generator" content="Tapestry Application Framework, version > 4.0.2"/> > <title>Best WEB Application on the planet!</title> > <link rel="stylesheet" type="text/css" title="don't select" > href="/styles/tapestryskin/theme.css"/> > > <style type="text/css"><!-- Custom <HEAD> Style Overrides --> > > div#header img { > position: absolute; > border: 1px solid #cecece; > width: 98%; > height: 98%; > float: left; > margin-right: .7em; > margin-bottom: .5em; > } > > body { > background-repeat: repeat, repeat; > width: auto; > padding: 0 0 0 0; > margin: 0 0 0 0; > background: #fff url( > /BlobService.svc?class= > org.trails.demo.AdminLayout&contentType=image/gif&fileName=backgd.gif&id=1&property=background > ) top left no-repeat; > } > > div#header { > width: 100%; > height: 100px; > padding: 0 0 0 0; > margin: 0 0 0 0; > background-size: 100%; > background-origin: content; > border: 5px solid #ccc; > background: #fff url( > /BlobService.svc?class= > org.trails.demo.AdminLayout&contentType=image/gif&fileName=header.gif&id=1&property=header > ) top left no-repeat; > } > > div#main { > > > padding: 15 auto; > > } > > div#splash { > background: #fff url( > /BlobService.svc?class= > org.trails.demo.AdminLayout&contentType=image/jpeg&fileName=splash.jpg&id=1&property=splash > ) top left no-repeat; > } > </style> > > </head> > > > <body> > ..... > > > > Best regards > Ken in nashua > > > > ----Original Message Follows---- > From: "Ken nashua" < [EMAIL PROTECTED]> > To: [EMAIL PROTECTED], users@tapestry.apache.org > Subject: RE: css overrides (ie6, ie7,firefox) ? > Date: Mon, 16 Jul 2007 14:35:58 -0400 > > I took the jsessionid issue out of the equation and the resize/stretch > problem persists. > > Across ALL browsers. I have spent much time trying different css > attributes > to flush it out. > > Best regards > Ken in nashua > > > > ----Original Message Follows---- > From: "Ken nashua" <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED], users@tapestry.apache.org > Subject: RE: css overrides (ie6, ie7,firefox) ? > Date: Mon, 16 Jul 2007 14:01:50 -0400 > > Folks, I appreciate the reply but the css overrides are being applied. > There > are many of them. Images are rendering, text, etc... > > The problem is the image is not scaling to the full width opf the box > when I > specify percentages up to 98%. > > The tapestry code is appending the session on buildURL() ???. > > @Asset("/styles/tapestryskin/theme.css") > public abstract IAsset getTheme(); > > writer.beginEmpty("link"); > writer.attribute("rel", "stylesheet"); > writer.attribute("type", "text/css"); > writer.attribute("title", "don't select"); > writer.attribute("href", getTheme().buildURL()); > writer.println(); > > So I did this... > writer.beginEmpty("link"); > writer.attribute("rel", "stylesheet"); > writer.attribute("type", "text/css"); > writer.attribute ("title", "don't select"); > String builtURL = getTheme().buildURL(); > String sessionStrippedURL = builtURL.substring(0, > builtURL.indexOf(";")); > writer.attribute("href", sessionStrippedURL); > writer.println(); > > Problem remains ... not solved. Why can't css elements resize properly? > > Thanks for trying... Is there some tacos oriented script I can > integrate? > > Best regards > Ken in nashua > > > > ----Original Message Follows---- > From: "Ken nashua" <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED], users@tapestry.apache.org > Subject: css overrides (ie6, ie7,firefox) ? > Date: Mon, 16 Jul 2007 10:25:39 -0400 > > I tried these on Shell > > doctype="" renderContentType="false" > > still no solution. > > Do I need to supplement a script to resize this dynamically/manually? > > Can someone offer a snippet? > > Best regards > Ken in nashua > > > > ----Original Message Follows---- > From: "Ken nashua" <[EMAIL PROTECTED]> > Reply-To: Tacos Developers < [EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: [Tacos-devel] css overrides (ie6, ie7,firefox) ? > Date: Mon, 16 Jul 2007 10:04:13 -0400 > > Guys (using tap-4.0), > > I implemented a Customhead component that extends Shell and functionally > is > sound. > > I render my own css overrides ... Specifically for header image on top > header portion of main page. > > I am wondering why the image fails to fill in the whole space of the DIV > ??? > > Here is the original css (from appfuse css-framework) > > div#header { > color: black; > clear: both; > padding: 0; > height: 94px; > /*height: auto;*/ > margin: 5px 5px 5px 5px; > /*background-size: 100%;*/ > /*background-origin: content;*/ > background: #fff url( images/trails- header94.jpg ) top left > no-repeat; > } > > No matter what I specify, the image renders short of the actual > width/height > of the element. > > I am unable to edit a solution to this in the css file. ?? > > Then when I try to specify custom head attributes that simply provide > css > overrides, that still does not work. Nothing works. > > Ie6 is toast when it comes to css and has enter/leave bugs. Ie7 > eventually > fails. Firefox cannot perform simple width/height geometry mgt when it > comes > to resizing the image to the actual size of the header element. > > Been blue in the face for sometime. > > Is there a solution to this? Shouldn't this stuff been nailed down years > ago? Below is a my last overrides rendered. > > Any help is appreciated. > Best regards > Ken in nashua > > <head> > <meta name="generator" content="Tapestry Application Framework, version > 4.0.2"/> > > <link rel="stylesheet" type="text/css" title="don't select" > href="/styles/tapestryskin/theme.css;jsessionid=u7smsn5p7hmv"/> > > <style type="text/css"><!-- Custom <HEAD> Style Overrides --> > > body { > background-repeat: repeat, repeat; > width: auto; > padding: 0 0 0 0; > margin: 0 0 0 0; > background: #fff url( > /BlobService.svc?class= > org.trails.demo.AdminLayout&contentType=image/gif&fileName=backgd.gif&id=1&property=background > ) top left no-repeat; > } > > div#header { > width: 100%; > height: 100px; > padding: 0 0 0 0; > margin: 0 0 0 0; > background-size: 100%; > background-origin: content; > border: 5px solid #ccc; > background: #fff url( > /BlobService.svc?class= > org.trails.demo.AdminLayout&contentType=image/gif&fileName=header.gif&id=1&property=header > ) top left no-repeat; > } > > div#main { > > > padding: 15 auto; > > } > > div#splash { > background: #fff url( > /BlobService.svc?class= > org.trails.demo.AdminLayout&contentType=image/pjpeg&fileName=splash.jpg&id=1&property=splash > ) top left no-repeat; > } > </style> > > </head> > > > <body> > .......... > > _________________________________________________________________ > Don't get caught with egg on your face. Play Chicktionary! > http://club.live.com/chicktionary.aspx?icid=chick_hotmailtextlink2 > > _________________________________________________________________ > Local listings, incredible imagery, and driving directions - all in one > place! http://maps.live.com/?wip=69&FORM=MGAC01 > > _________________________________________________________________ > http://liveearth.msn.com > > _________________________________________________________________ > Need a brain boost? Recharge with a stimulating game. Play now! > http://club.live.com/home.aspx?icid=club_hotmailtextlink1 > > _________________________________________________________________ > Need a brain boost? Recharge with a stimulating game. Play now! > http://club.live.com/home.aspx?icid=club_hotmailtextlink1 > > _________________________________________________________________ > http://newlivehotmail.com > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >