Skip to content

Commit

Permalink
js funktioniert jetzt
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiaslenz committed Apr 24, 2012
1 parent 88daf5a commit 2e00d3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
@@ -1,7 +1,7 @@
<?php foreach($questionArray as $question) { ?>
<div>
<h3><?php echo $question['text']; ?></h3>
<form id="question<?php echo $question['id']; ?>" onsubmit="submitForm('question<?php echo $question['id'];?>');">
<form id="question<?php echo $question['id']; ?>" onsubmit="return submitForm('question<?php echo $question['id'];?>');">
<?php foreach($question['answers'] as $answer) { ?>
<input type="<?php echo $question['type'] ?>"
name="<?php echo 'answer' . $question['id'] ?>"
Expand Down
5 changes: 2 additions & 3 deletions apps/frontend/templates/layout.php
Expand Up @@ -53,13 +53,12 @@ function submitForm(id) {
// $.get(path, function(data){
// alert("Data Loaded: " + data);
// });
alert(path);
$.ajax({
type: "GET",
url: path
}).done(function( msg ) {
alert("Success" + msg);
//$(selector).fadeOut("slow");
$(selector).fadeOut("slow");
return false;
});

return false;
Expand Down

0 comments on commit 2e00d3f

Please sign in to comment.