Skip to content

Instantly share code, notes, and snippets.

@Xiphe
Created June 11, 2013 12:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Xiphe/5756585 to your computer and use it in GitHub Desktop.
Save Xiphe/5756585 to your computer and use it in GitHub Desktop.
Alternative Parameterübergabe an popups
<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>
<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