cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geert Josten <Geert.Jos...@daidalos.nl>
Subject Re: How to *not* return a page
Date Wed, 28 Sep 2005 08:50:15 GMT

No, not with XmlHttpRequest. It should be possible to do something like this:

<div style="display:none">
   <script language="JavaScript">
     function setSessionAttribute(name, value) {
       hiddenform.name = name;
       hiddenform.value = value;
       hiddenform.submit();
     }
   </script>
   <form name="hiddenform" action="set-session-attribute" method="POST" target="hiddenframe">
     <input type="text" name="name" value="dummy" />
     <input type="text" name="value" value="" />
   </form>
   <iframe name="hiddenframe" />
</div>

<a href="#" onClick="javascript: setSessionAttribute('my-name', 'my-value'); return false;">set

session attribute</a>

Or maybe even something like this:

<div style="display:none">
   <script language="JavaScript">
     function setSessionAttribute(name, value) {
       hiddenframe.href = "set-session-attribute?name=" + name + "&value=" + value;
     }
   </script>
   <iframe name="hiddenframe" />
</div>

<a href="#" onClick="javascript: setSessionAttribute('my-name', 'my-value'); return false;">set

session attribute</a>

HTH,
Geert

Derek Hohls wrote:

> Geert 
>  
> Would this be in combination with XmlHttpRequest, as suggested 
> by Bertrand?  If not, then how?
>  
> Thanks
> Derek
> 
> 
>>>>Geert.Josten@daidalos.nl 2005/09/28 09:14:13 AM >>>
> 
> Hi Derek,
> 
> You can make it yourself easy by using a iframe on a display:none area (<div 
> style="display:none"><iframe name="invisibleframe" src="" /></div>) and
targeting your javascript 
> submits to there.
> 
> Cheers,
> Geert
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
> For additional commands, e-mail: users-help@cocoon.apache.org 
> 
> 
> 
> 

-- 
Drs. G.P.H. Josten
Consultant



Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl


De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is

uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen,
verzoeken 
wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message