- This topic has 4 replies, 2 voices, and was last updated 12 years, 9 months ago by support-michael.
-
AuthorPosts
-
cmstephanMembereditied by @support-wayne; revised title to be more descriptive
Hi,
I have following issue and do not get it fixed.What do I want to do:
– I hava a page where I can input an “ID”
– I would like to take the “ID” submit a form with the ID as parameter and call a php file on the server. The php file returns an xml.
– After getting the result I would like to check if I get data realted to the ID or if I get nothing (because the ID was wrong).
– In case of a positive check I would like to population the data of the next page with the return data from the php call (xml)
– In case of a negative check I would like to show an error and stay on the pageWhat I did:
– Setup two pages with the architecture “Local” (Client_Start for data iniput, Client_Meeting to display data)
– First one is a html file with Form (Method get)
– Form Action URL is my php file “localhost/getResults.php”
– Form Result is Data-only(AJAX)I implemented the phoneui.postSubmitForm_m1_Client_Start function as followed:
phoneui.postSubmitForm_m1_Client_Start = function(isSuccess, data) {
var result = true;
if (isSuccess) {
// process data
if (data.hasChildNodes() == true) {
// read XML
var strMeetingId = data.getElementsByTagName(‘id’)[0].firstChild.nodeValue
var strMeetingTitel = data.getElementsByTagName(‘titel’)[0].firstChild.nodeValue
var strMeetingAnonym = data.getElementsByTagName(‘anonym’)[0].firstChild.nodeValue// fill data into the next form
$(‘#m1-Client_Meeting-txtMeeting’).text(strMeetingTitel);
$(‘#m1-Client_Meeting-txtMeetingId’).text(strMeetingId);
$(‘#m1-Client_Meeting-txtAnonym’).text(strMeetingAnonym);// forward to next page
phoneui.gotoPage(‘#m1-Client_Meeting’,phoneui.transitions.slideRight);result = true;
} else {
alert(‘No data for ID’);
result = false;
}
} else {
// submit failed
// data = error msg
alert(‘No connection’);
result = false;
}
return result;
}What happens:
– if I run it in the debugger mode the function postSubmitForm_m1_Client_Start is called twice ???
– the php is called twice as well
– I get data back as xml
– I get the result : TypeError: Result of expression ‘document.body’ [null] is not an object. cefresource://inspector/inspector.html:1What is wrong – thanks for your help
Christopher
support-michaelKeymasterSounds like 2 form submits are being fired from your UI. How is your submit action configured in the UI?
Can you share your design (.mobi) files for review?
cmstephanMemberHi Wayne,
I have a button with OnClick “submit form”.
I do not know why it fires the form submit two times?
Find attached the mobi files.If you have another idea to handle what I want to do – let me know.
Thanks for your support
ChristopherAttachments:
You must be logged in to view attached files.
support-michaelKeymasterI shared your details and a test case with dev team. We confirm this is a bug for the duplicate submit firing. An area of big improvement in the upcoming 1.5 version is we have revamped how forms are configured and processed. The 1.5 version is in QA now and should be available by the end of the week.
support-michaelKeymasterThis bug is fixed in MobiOne 1.5. See this ANN for info.
-
AuthorPosts