You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by mariuso <ma...@roomity.com> on 2005/11/07 22:55:25 UTC

Re:JSF and iframe

Thanx for the answer. I did it this way:

<div style="display: none;">
			<h:commandLink id="dldCmdLink" value="download" action="#{courseTracker.viewItemContent}" target="downloadButton" />
		</div>
		<iframe id="downloadButton" name="downloadButton" width="100%" height="400">
		</iframe>
	
		<script>
			function addEvent(obj, evType, fn){ 
			 if (obj.addEventListener){ 
			   obj.addEventListener(evType, fn, false); 
			   return true; 
			 } else if (obj.attachEvent){ 
			   var r = obj.attachEvent("on"+evType, fn); 
			   return r; 
			 } else { 
			   return false; 
			 } 
			}
		
			function test() {
				clear_linkDummyForm();
				document.forms['linkDummyForm'].elements['linkDummyForm:_link_hidden_'].value='dldCmdLink';
				document.forms['linkDummyForm'].target='downloadButton';
				document.forms['linkDummyForm'].submit();
			}
			
			addEvent(window, 'load', test);
		</script>



--------------------------------------------------------------------------------------------------------------------------------
Broadband interface (RIA) + mail box saftey = <a href="http://MyFaces_Users_List.roomity.com">MyFaces_Users_List.roomity.com</a>
*Your* clubs, no sign up to read, ad supported; try broadband internet. ~~1131400525106~~
--------------------------------------------------------------------------------------------------------------------------------

Re: JSF and iframe

Posted by Marius Oancea <ma...@yahoo.ca>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
<div style="display: none;">
            <h:commandLink id="dldCmdLink" value="download"
action="#{courseTracker.viewItemContent}" target="downloadButton" />
        </div>
        <iframe id="downloadButton" name="downloadButton" width="100%"
height="400">
        </iframe>
   
        <script>
            function addEvent(obj, evType, fn){
             if (obj.addEventListener){
               obj.addEventListener(evType, fn, false);
               return true;
             } else if (obj.attachEvent){
               var r = obj.attachEvent("on"+evType, fn);
               return r;
             } else {
               return false;
             }
            }
       
            function test() {
                clear_linkDummyForm();
               
document.forms['linkDummyForm'].elements['linkDummyForm:_link_hidden_'].value='dldCmdLink';
                document.forms['linkDummyForm'].target='downloadButton';
                document.forms['linkDummyForm'].submit();
            }
           
            addEvent(window, 'load', test);
        </script>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
 
iD8DBQFDb82f5d1Dx2/EvN4RAlr/AJ0c+9qAtuGxEApWcTEAuj7JCXT6BACfdxwh
570bglqo/E6SywIL2b70cFQ=
=44FG
-----END PGP SIGNATURE-----