I have an ASP script that creates a RealOne ActiveX object and the file source for the player to play comes from a QueryString, i.e. mypage.asp?cliptoplay=whatever.smil
But if the .smil file did not exist in the directory, which could happen if for whatever reason the user typed in random jargon instead of whatever.smil, or if there was nothing passed in QueryString then I just get RealOne saying "A General Error Has Occured" (it's slang for File Not Found)
How can I avoid this? I am primarily interested in inhibiting the errors if no QueryString is passed, as I doubt users will be into the habit of typing random filenames into the querystring!
The code I am using at the moment is:
<object id=RAOCX classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" height="36" width="350">
<param name="CONTROLS" value="ControlPanel">
<param name="CONSOLE" value="sound1">
<param name="AUTOSTART" value="true">
<param name="SRC" value="rtsp://ip-address/jlmedia/<% Response.Write clipfile %>">
The only thing I could think of is to use IF clipfile<>"" THEN ... then Response.Writing my object parameters etc. and then ELSE Response.Write("Filename not found, please try again") So the RealOne ActiveX doesn't load if nothing is found in the QueryString
Is this the best way or is there a better way to achieve this?