Jump to content


Diego_Sao_Luis_MA

Member Since 04/01/2012
Offline Last Active 04/01/2012, 17:33
-----

Topics I've Started

Missao Impossivel - Pegar Variavel Javascript De Um Frame

04/01/2012, 16:44

Tenho duas paginas:

index.html
----------------
<html>
	
	<script LANGUAGE="JavaScript">  
	        function b() {  
			var teste = VARIAVEL_"diego";; 
			alert(teste);	
		}  
	</SCRIPT>  
	
	<body onload="b()">
	     PAGINA 1;	
			<iframe src="pagina2.html" name="indexFrame" id="indexFrame">
				
			</iframe>
		
		
	</body>
	
</html>

---------------
pagina2.html

<html>

	<script>
		function teste(){
			var diego = 'lokuraaa';
		}
		
		
		
	</script>

	<body>
		
			PAGINA2;
		</form>
	</body>
</html>
===========================

observe q index.html possui um "iframe" apontando para pagina pagina2.html, a pagina2.html possui uma funcao "teste(), dentro desta funcao tem uma variavel "diego", queria saber como mostrar ela em uma alert na index.html...

SEM USAR RETURN DIEGO..
desde ja agradeco galera,,,quero ver quem e o fera ae...

IPB Skin By Virteq