Is this possible?

Currently i load one of my content types in a shadowbox, i have done this by theming this type without a header & footer. What i want is force shadowbox to close after the user submits the node/add form. i know this should be done by adding a button onClick event to the submit button of the form, but how can i implement this (where to put he code) and what's the code to use?

Can someone help me with this?
Thanks
Nielsvoo

Comments

nielsvoo’s picture

Issue summary: View changes

g

nielsvoo’s picture

Status: Active » Closed (fixed)

I fixed it using rules....

how?

just add a close.php file to the root of your site with the following content

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<script type="text/javascript">
function cerrar(){
  parent.location.reload();
  parent.Shadowbox.close();
}
</script>
</head>
<body onLoad="cerrar();";>
</body>
</html>

add a rule with a redirect to this page after a submission of your form. (see rules forms module)

thats it...

klucid’s picture

Thank you for the solution! It's simple and effective.

klucid’s picture

Issue summary: View changes

g