ideavist
Posts: 0
Joined: Fri Aug 24, 2012 11:15 pm

Exception Message Part 2

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.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Exception Message Part 2

It worked and then stopped working?

ideavist
Posts: 0
Joined: Fri Aug 24, 2012 11:15 pm

Exception Message Part 2

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???

ideavist
Posts: 0
Joined: Fri Aug 24, 2012 11:15 pm

Exception Message Part 2

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.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Exception Message Part 2

Can you attach a screen shot of your response mapping?

ideavist
Posts: 0
Joined: Fri Aug 24, 2012 11:15 pm

Exception Message Part 2

Here ya go.

Image

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Exception Message Part 2

What do you have in Change JavaScript?

ideavist
Posts: 0
Joined: Fri Aug 24, 2012 11:15 pm

Exception Message Part 2

return "You new message";

ideavist
Posts: 0
Joined: Fri Aug 24, 2012 11:15 pm

Exception Message Part 2

return "That name does not exist";

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Exception Message Part 2

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

Return to “Issues”