This is a migrated thread and some comments may be shown as answers.

Submit button

3 Answers 481 Views
Application
This is a migrated thread and some comments may be shown as answers.
Chandu
Top achievements
Rank 1
Chandu asked on 20 Mar 2012, 12:18 AM
I would like to Submit my page on click of a button. I am not able to figure out how I could do this, could you please help.

I had added the <form> tags and tried using the JS way of doing the submit:
 function submitform() {
            document.forms["myform"].submit();
        }

But this is erroring out with the JS error
  1. Uncaught Error: Syntax error, unrecognized expression: );
    1. c.querySelectorAll.mjquery-1.7.1.min.js:3
    2. f.fn.extend.findjquery-1.7.1.min.js:3
    3. c.Observable.extend._findViewkendo.all.min.js:9
    4. c.Observable.extend.navigatekendo.all.min.js:9
    5. c.Observable.extend._startHistory.e.changekendo.all.min.js:9
    6. w.extend.triggerkendo.all.min.js:9
    7. kendo.Observable.extend.navigatekendo.all.min.js:9
    8. f.event.dispatchjquery-1.7.1.min.js:3
    9. f.event.add.h.handle.i


I think I am doing something fundamentally wrong. 

3 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 20 Mar 2012, 08:26 AM
Hi,

I am not sure what the problem may be here. Can you post an URL to your project, so that we can see what goes on? 

Kind regards,
Petyo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Chandu
Top achievements
Rank 1
answered on 20 Mar 2012, 02:00 PM
Petyo thanks for the reply. 

I am still working with the Sushi Demo page to try to implement couple of things before moving my code. I am enclosing the Sushi Demo code in the rar file which has the details.

Changes I made to the Default page are: 

1)  Adding <form> tags
2)  JS function to handle submit function.
3)  Button to Test the Submit in "Account" tab.

I created a Result.aspx page that the page should be posting to. 

Please let me know if you need further details.

Thanks for the support.
Chandu
0
Petyo
Telerik team
answered on 20 Mar 2012, 04:31 PM
Hello,

Your initial guess was correct. Mixing ASP.NET server tags and Kendo UI Mobile markup is not supported. Also, using href="javascript ... " for buttons is not supported, as the mobile Application expects a view identifier there (not executable code). 

The recommended means of data transportation would be the DataSource component. Also, our demos have a lot of sample code that may help you. 

Greetings,
Petyo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Application
Asked by
Chandu
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Chandu
Top achievements
Rank 1
Share this question
or