Hello.
I have a form:
<form method="post" id="mujform1" action="inc/update_homepage.php" >
<fieldset>
<label for="Nadpis"><strong>Nadpis:</strong></label><br />
<input id="Nadpis" name="Nadpis" size="60" maxlength="250" type="text"
value="<?php echo $nadpis; ?>" /><br />
<label for="Text"><strong>Text:</strong></label><br />
<textarea id="content" name="content" COLS="60" ROWS="19">
<?php echo $text; ?>
</textarea>
<input id="id" name="id" type="hidden" value="<?php echo $id; ?>" />
<input id="sekce" name="sekce" type="hidden" value="<?php echo
$adresa_sekce; ?>" />
<input type="submit" name="submit" class="button" value="Odešli text
na server" />
</fieldset>
</form>
<div id="odezva"></div>

and this form i want tu send trough jQuery plugin:
<script language="javascript" type="text/javascript">

        $(document).ready(function() {

            $('#mujform1').ajaxForm({

                target: '#odezva',

       success: function() {
            $('#odezva').fadeIn('slow');
        }
   });
});

</script>

in update_homepage.php i save data to mysqldb.

But if i click to submit buton, i see in <div id="odezva"></div> OK
echo from update_homepage.php, but in db is only first (Nadpis) field
of form. And (!!!) if i click to this button second time go to db also
second field!
If i close Javascript - all is right - the page is reloaded and all
data are in db.

Can you help me? I want ofcourse send all data of first click.
Zhank you very much!

Reply via email to