Created
June 11, 2013 12:57
-
-
Save Xiphe/5756585 to your computer and use it in GitHub Desktop.
Alternative Parameterübergabe an popups
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Parameter Uebergabe JS</title> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
jQuery(document).ready(function() { | |
$('#preview_link').click(function(event) { | |
event.preventDefault(); | |
var popup = window.open( | |
'preview.php?'+$('#form').serialize(), | |
'Vorschau', | |
'scrollbars=no,menubar=no,height=600,width=800,resizable=yes,toolbar=no,status=no' | |
); | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<form id="form"> | |
<input name="foo" value="bar" /> | |
<input name="fop" value="bas" /> | |
<input name="foq" value="bat" /> | |
<input name="for" value="bau" /> | |
<input name="fos" value="bav" /> | |
<input name="fot" value="baw" /> | |
</form> | |
<a href="#preview" id="preview_link">Preview</a> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Parameter Empfaenger JS</title> | |
</head> | |
<body> | |
<?php var_dump($_GET); ?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment