Page 1 of 2

Exception Message Part 2

Posted: Wed Aug 29, 2012 7:04 pm
by ideavist

This in in continuation of the problem I had before....
http://gsfn.us/t/33c5h

Basically, the return message is now populating regardless of whether or not the name is valid.

I wanted the return message to populate ONLY if the name is invalid.


Exception Message Part 2

Posted: Wed Aug 29, 2012 7:10 pm
by maxkatz

It worked and then stopped working?


Exception Message Part 2

Posted: Wed Aug 29, 2012 10:19 pm
by ideavist

Well, here's what happened. I put in the javascript code you provide (thanks again).

I tested it by putting in a name that I knew would be invalid (like Knty). Sure enough, the message populated just as it was suppose to saying "that name is not exist".

So I thought it worked fine. Hence my premature happiness :-)

Then I tried the app using a name I knew to be valid (like Bob). The app displayed the info related to the name (which it's suppose to), AND it also populated the error message.

Maybe I have it mapped wrong???


Exception Message Part 2

Posted: Wed Aug 29, 2012 10:20 pm
by ideavist

Just to clarify, before I put in that javascript, the app would populate the standard 404 message if the name did not exist. It would NOT populate if the name did exist.

This worked fine.

The purpose of the javascript was to change the message if there was an error.


Exception Message Part 2

Posted: Thu Aug 30, 2012 12:27 am
by maxkatz

Can you attach a screen shot of your response mapping?


Exception Message Part 2

Posted: Thu Aug 30, 2012 4:52 pm
by ideavist

Here ya go.

Image


Exception Message Part 2

Posted: Thu Aug 30, 2012 4:55 pm
by maxkatz

What do you have in Change JavaScript?


Exception Message Part 2

Posted: Thu Aug 30, 2012 4:55 pm
by ideavist

return "You new message";


Exception Message Part 2

Posted: Thu Aug 30, 2012 4:56 pm
by ideavist

return "That name does not exist";


Exception Message Part 2

Posted: Thu Aug 30, 2012 4:58 pm
by maxkatz

Add this before the return statement and let me know what you get:
alert ('['+value+']');