Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I can not submit the form;!!

function loginSubmit()
    {
        if(!isSubmitted){
            if(jQuery('#frmLoginStart').validationEngine('validate') != true)
                return false;
            isSubmitted = true;
            document.frmLoginStart.submit();
        }
    }   


    <form action="/esube/logon/loginend.jsp" method="post" name="frmLoginStart" id="frmLoginStart">     
                                                <input type="hidden" value="tr_TR" name="rdLng" >

<input type="text"  name="txtUsername" id="txtUsername">

<input type="password"  name="txtPassword" id="txtPassword">
    <a title="GİRİŞ" class="btnType2 button2" onclick="loginSubmit();return false;" name="btnSubmit" href="javascript:;"><span></span>GİRİŞ</a>
    </form>

curl error curl submit click link no submit button difficulty my speak turkish please help

$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/19.0.2");
curl_setopt($ch, CURLOPT_COOKIEFILE, getcwd().'/cookie.txt');

curl_setopt($ch, CURLOPT_URL, "https://esube1.ziraatbank.com.tr/esube/logon/loginstart.jsp");

$postu = "rdLng=tr_TR&txtUsername=51253433&txtPassword=976035";

curl_setopt($ch, CURLOPT_URL, 'https://esube1.ziraatbank.com.tr/esube/logon/loginend.jsp');

bu nasıl bir site anlamadım yazdığım kodları almıyor

share|improve this question

closed as not a real question by Quentin, Christoph, Jay Gilford, cryptic ツ, Ocramius Mar 13 '13 at 2:15

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
If I am reading this right, and if isSubmitted is the id of your submit button, then you are basically asking if the submit button was NOT clicked and the form is not submitted. That would at least be a starting point, I think. –  Jim Mar 12 '13 at 15:59
add comment

2 Answers

It's better to use event binding to submit of the form, rather than a link, that triggers it. You are trying to collect in a global variable isSubmitted if the form is submitted and there were validation errors, am I correct?

var isSubmitted = false;
$(document).ready(function () {
    $('form[name=frmLoginStart]').submit(function (e) {
        if ($(this).validationEngine('validate') != true) {
            e.preventDefault();
            isSubmitted = true;
        }
    });
});  


<form action="/esube/logon/loginend.jsp" method="post" name="frmLoginStart" id="frmLoginStart">     
    <input type="hidden" value="tr_TR" name="rdLng" autocomplete="off">
    <input type="text"  size="20" maxlength="10" value="" autocomplete="off" name="txtUsername" id="txtUsername">
    <input type="password" size="20" maxlength="5" autocomplete="off" name="txtPassword" id="txtPassword">
    <button type="submit" class="btnType2 button2" name="btnSubmit"><span></span>GİRİŞ</button>
</form>
share|improve this answer
    
You misunderstand me –  ibrahim Mar 12 '13 at 16:20
    
'm with curl data. another server, the codes are codes –  ibrahim Mar 12 '13 at 16:21
add comment

I think you are trying to automate login to a bank app, located at https://esube1.ziraatbank.com.tr/esube/logon/loginstart.jsp?rdLng=EN.

That login form uses javascript. Curl does not execute javascript. Hence, your approach will not work. You'd at least need something that executes javascript.

PS. you might want to strip your user id & password for your banking account before posting into public forums.

share|improve this answer
    
ı am speak turkish.. I can not post with curl to this url esube1.ziraatbank.com.tr/esube/logon/loginend.jsp pleaseee helllpppp? –  ibrahim Mar 13 '13 at 12:33
    
turkish –  eis Mar 13 '13 at 12:58
    
note that in stackoverflow, the language of communication is english. –  eis Mar 13 '13 at 12:59
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.