Using Apex 4.1.1
I need my application to redirect to another page when user carries out a search and there is no data found. The query in the report is overly complicated and is of type "PL/SQL function body returning SQL query" and needs to be like that. It just wont run on its own.
Initially I tried Javascript to run onLoad &
Execute when Page Loads like:
function redirect_on_no_data_found2()
{
// if user came from non-catalogue page
if($(".nodatafound").html() == "no data found")
{
redirect('f?p=129:8:'+$v('P1_SESSION_ID_VALUE')+':NO_DATA_FOUND:NO::');
}
}
But javascript like this is far too unreliable in IE 7 which is what users use and doesn't work in some instance while works in other.
Is there any other way I could do a redirection without javascript or using APEX_APPLICATION.redirect procedure? Kind of run out of ideas.
Many Thanks.