Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
HOW TO? Display server response in bottominfo *on success*???
21/09/2010
07:16
Avatar
Trober
Member
Members
Forum Posts: 21
Member Since:
14/09/2010
sp_UserOfflineSmall Offline

I see others asking  same question,  but no answer I found in their threads posted.

PROBLEM: DISPLAY MESSAGE ON FORM (FORM EDITING)  IF  *SUCCESS OR FAILURE*  IN SERVER RESPONSE.

Like doc says, if afterSubmit return true, message is NOT displayed.   WHY???  We MUST have message on form for success,

Maybe jQuery selector is wrong below?  

afterSubmit: function (resp, pdata) {

    var m = resp.responseText.split(':');

    $('bottominfo').text(m[1]);  // <=== PUT MESSAGE ON FORM *REGARDLESS* OF SUCCESS/FAILURE.

    return(m[0] == 'true' ? true : false, m[1], m[2] != undefined  ? m[2] : null);  // <== RETURN MESSAGE EVEN WHEN SUCCESS, BUT NEVER DISPLAYS (AS DOC SAYS IT WILL NOT IF RETURNING TRUE....AGAIN, WHY???)

}

Cry

Thanks in advance for help.  

21/09/2010
07:57
Avatar
Trober
Member
Members
Forum Posts: 21
Member Since:
14/09/2010
sp_UserOfflineSmall Offline

We find our answer, but not sure why it didn't work.

Another page in our app DID update .bottominfo on success.

We compare the two, and found no difference other than order of setting parameters prior to display form.

Debugging in browser showed no errors of any kind, working or non-working page.

We copy working page to non-working and just have to close this.

Sorry, we cannot debug it to find out our time must go on our app.

21/09/2010
08:48
Avatar
Trober
Member
Members
Forum Posts: 21
Member Since:
14/09/2010
sp_UserOfflineSmall Offline

Sorry to post we have a solution so quick.  We do not.  Frown

Bottominfo never displays message even when successful, e.g.

afterSubmit: function(response, postdata) {
    var ss = response.responseText.split(':');

    var tf = (ss[0] == '1') ? true : false;     $('.bottominfo').text(ss[1]);                                   <== We want "Item successfully created".  How???    var newid = (ss[2] != undefined) ? ss[2] : null;     return [tf, ss[1], newid];
  }

21/09/2010
09:13
Avatar
Trober
Member
Members
Forum Posts: 21
Member Since:
14/09/2010
sp_UserOfflineSmall Offline

We find the side-effect.

bottominfo has  to be > 1 length set when create form:

    bottominfo: '  '   // <=== at least one space.

if zero-length, e.g.

    bottominfo: ''    // <=== zero-length string, but sets it in DOM bottominfo.  If not in initilialize, then not in DOM, then never works.

Confused

For sake of community we post our find.

04/11/2010
13:43
Avatar
jboss
Member
Members
Forum Posts: 13
Member Since:
29/06/2010
sp_UserOfflineSmall Offline

how dou you send the data from the server?

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
48 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information