close boxy fron iframe

71 views
Skip to first unread message

gerardo

unread,
Jan 3, 2010, 3:03:25 AM1/3/10
to boxy
hi

this my code for create boxy:

<input type="button" name="nw2" id="nw2" value="galeria" class="btn"
onclick='Boxy.load("partial.html",
{title:"Galeria",modal:false,draggable: false});' />

this code partial.html

<div style='background-color: blue; height: 200px; width: 400px;
padding: 15px; color: white; font-size: 30px' >
<iframe name="ifrupload" width="200px" scrolling="No" height="200px"
marginheight="0" frameborder="0" marginwidth="0" src="form.html" ></
iframe>
</div>

this code form.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
Registro
<input name="tx_uno" id="tx_uno" type="text" /><br />
Registro
<input name="" type="text" /><br />
Registro
<input name="" type="text" />
<label>
<input type="submit" name="button" id="button" value="Submit" />
</label>
<input type="button" value="cerrar6" onclick='self.parent.cerrar_remoto
(this)' />
</form>
</body>
</html>

the question is:

How can I close the modal window from the iframe?

gerardo

unread,
Jan 5, 2010, 1:50:19 AM1/5/10
to boxy
yes, find one soluction

en my index.html this code

[code]
<input name="add" value="crear box" type="button" onclick='crear_modal
()' />

add div in display hidde
in the body page

<div id='foobar' style='display: none; background-color: green; color:
white; font-size: 30px; color: white; padding: 15px; height: 400px;
width: 400px;'>
<iframe name="ifrupload" width="400px" scrolling="No" height="200px"


marginheight="0" frameborder="0" marginwidth="0" src="form.html" ></

iframe> <input type="button" value="cancelar_div"
onclick='cerrar_remoto(this)'/>
</div>

[/code]

add function javascript in the head

[code]

function crear_modal()
{
new Boxy(jQuery('#foobar'),{title: "modal add", modal: false,
closeable: true, closeText: "una imagen cerrar"});

}


function cerrar_remoto()
{
var self = document.getElementById('foobar');
Boxy.get(self).hide();
}
[/code]

now in the file form.html

[code]
<html>
etc
.
.
.
.
<body>
<form name="formulario" method="post" action="">
Registro


<input name="" type="text" />
<label>
<input type="submit" name="button" id="button" value="Submit" />
</label>

<input type="button" value="cerrar_final_add" id="txcerrarUno"
onclick='self.parent.cerrar_remoto()' />//this button close windows
modal boxy
</form>
</body>
</html>
[/code]

this my solution jiji
goog bye

Reply all
Reply to author
Forward
0 new messages