所有網頁 圖片 影片 地圖 新聞 網誌搜尋 Gmail 更多 »
最近造訪的群組 | 說明 | 登入
Google 網上論壇首頁
Validation question
目前本群組有太多主題設為優先顯示。要優先顯示這個主題,請將其他主題的這個選項取消。
在處理您的要求時發生錯誤。請再試一次。
標幟
  1 則留言 - 全部摺疊  -  將全文翻譯為 已翻譯 (查看所有原文)
您要留言的群組是 Usenet 群組。在此群組留言,網際網路上的任何使用者將可以看到您的電郵地址。
您的回覆郵件尚未寄出。
您已成功留言
 
寄件人:
收件人:
副本:
後續追蹤對象:
新增副本 | 新增後續追蹤對象 | 編輯主旨
主旨:
驗證:
為了確認,請輸入您在以下圖片中看到的字元,或輸入您按下存取圖示時所聽到的號碼。 注意聽並輸入您聽到的號碼
 
Dave  
檢視個人資料   翻譯為 已翻譯 (查看原文)
 更多選項 11月6日, 上午8時29分
寄件人: "Dave" <make.cake.b...@gmail.com>
日期: Thu, 5 Nov 2009 20:59:59 -0330
當地時間: 2009年11月6日(星期五) 上午8時29分
主旨: Validation question
I am submitting a form using ajax and have a few questions.

I found pseudocoders validation plugin, looked at few others but not working
quite the way i want.

Can you submit the form ajax without validating the form and have nothing
happen until the response is sent back from the model / controller as valid
or not? Then depending on the response tell the script to do something?

I found that showing all your validation in the code to not be an optimum
approach. I know there is the bootstrap to remove specific validation
checks, but my major problem is unique or custom validation methods. If I
remove checking an email is unique the js says its fine. Hits the model and
it says no thats not a good email so the form does not save, yet the js has
gone thru saying its validated and shows user success message then the div
returns with the form hi-lighting the email error field.

Basically my form loads into a div, success its removed. But js says its
successful in validating so it removes the form, model says not valid and
returns the form back to correct errors, yet the js success function () has
run saying to the user updated successfully with other elements fading in,
out, toggle what not.

//validation occurs before sending if valid
$(this).ajaxSubmit({

    type:    'post',
    url:      '/manage/profile/',
    data:     queryString,
    target:   '#profile',
    success: function(){
     $("#profile").slideToggle('slow');
     $(".success").show().fadeOut(5000).slideUp();
     }
             });

Now not sure if this can be done:

Idea would be user clicks the sumbit form and sends the data to the
controller to process if validates() but the form does nothing, sitting
waiting for the response and depending on the response do something.

Has anyone come up with a method that validates using just the controller
and model using ajax forms?

Open to ideas, suggestion.

Dave


    回覆    回覆作者    轉寄  
您必須先登入才能張貼訊息。
若要張貼訊息,您必須先加入此群組
請在留言之前更新您訂閱設定網頁上的暱稱。
您沒有留言所需的權限。
無其他留言
« 返回討論主題 « 較新的主題     較舊的主題 »

建立群組 - Google 網上論壇 - Google 首頁 - 服務條款 - 隱私權政策
©2009 Google