Dealing with responsetext in ajax call

Hi

I have a very simple ajax call to a very simple agent that all works fine.

The issue I have is that the responsetext can be blank, and if it is I don’t want any action to take place. However the responsetext has lots of html tags (well, a few anyway), so if I just do a simple test in javascript on the return function it’ll always find some content.

The responsetext is:

The blank line is where content would normally go.

So is there something I can do in the agent, or do I need to test the string in javascript (and if so, what’s the best way to do this)?

The agent effectively is just a one line print statement, either returning some text or “”.

Thanks

Dan

Subject: Dealing with responsetext in ajax call

Hi

Rather than returning “”, try:

Print “Content-Type: text/xml”

Print “”

then you can test for the existence of the “nothing” tag (or similar) in your JS code.

The way you have it now, as there’s no output from the agent, domino is making its own.

HTH

Kiers

Subject: RE: Dealing with responsetext in ajax call

Thanks Kieran

I’ll try it soon, sounds like what I was looking for (had to move onto something else for now)

Dan