Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JavaScript]Popup, problem z przesyłaniem formularza, jQuery
KrzysiekKCN
post
Post #1





Grupa: Zarejestrowani
Postów: 148
Pomógł: 2
Dołączył: 4.08.2009
Skąd: Poznań

Ostrzeżenie: (0%)
-----


Cześć, mam straszny problem z przesłaniem formularza w okienku popup.
W kodzie mam umieszczony div z popupem
Kod
Zmień stan produktu:
<a href="#"class="close" style="float:right;"><img src="images/table/action_delete.gif" border="0"></a>
<form action="index.php?do=depot&procedure=modify_book" name="formid" method="POST">
<p>Akcja:
        <select name="akcja" class="styledselect_form_1">
            <option value="1">ODPIS</option>
            <option value="2">ZWROT</option>
        </select>
</p>
<p>
Ilość: <input type="text" class="inp-form" name="ilosc"/>
</p>    
<p>
Data: <input type="text" class="inp-form" name="data"/>  - format RRRR-MM-DD
</p>    
<p>
OD/DO:
<p>BUDOWA: <input type="text" id="budowa" class="inp-form" name=""/>&nbsp;<a href="index.php?do=build&procedure=add_build"><img src="images/forms/add_build.png" border="0"></a></p>
<p>KLIENT: <input type="text" id="budowa" class="inp-form" name=""/>&nbsp;<a href="index.php?do=clients&procedure=add_client"><img src="images/forms/add_client.png" border="0"></a></p>
</p>
<input type="button" value="" class="form-submit" />
</form>
<a href="index.php?do=depot&procedure=show_all_product" onclick="document.formid.submit();">prześlij - próba linkiem</a>
</div>
</div>


i takie okienko otwieram linkiem:
Kod
<a href="#dialog" name="modal"><img src="images/forms/stan.png" border="0"></a>


do tego mam załączony jakiś tam css i kod jquery:
Kod
<script type="text/javascript">

$(document).ready(function() {    

    //select all the a tag with name equal to modal
    $('a[name=modal]').click(function(e) {
        //Cancel the link behavior
        e.preventDefault();
        
        //Get the A tag
        var id = $(this).attr('href');
    
        //Get the screen height and width
        var maskHeight = $(document).height();
        var maskWidth = $(window).width();
    
        //Set heigth and width to mask to fill up the whole screen
        $('#mask').css({'width':maskWidth,'height':maskHeight});
        
        //transition effect        
        $('#mask').fadeIn(1000);    
        $('#mask').fadeTo("slow",2.0);    
    
        //Get the window height and width
        var winH = $(window).height();
        var winW = $(window).width();
              
        //Set the popup window to center
        $(id).css('top',  winH/2-$(id).height()/2);
        $(id).css('left', winW/2-$(id).width()/2);
    
        //transition effect
        $(id).fadeIn(2000);
    
    });
    
    //if close button is clicked
    $('.window .close').click(function (e) {
        //Cancel the link behavior
        e.preventDefault();
        
        $('#mask').hide();
        $('.window').hide();
    });        
    
    //if mask is clicked
    $('#mask').click(function () {
        $(this).hide();
        $('.window').hide();
    });            
    
});

</script>


no i problem jest w tym, że nie mogę przesłać formularza, ani do pliku w którym jest ten div, ani też do samego otwartego popupa.
Okienko otwiera się bezproblemowo, mogę umieszczać linki, tylko formularz nie chwyta.

Proszę o pomoc,
pozdrawiam i dzięki
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 2.10.2025 - 19:46