What you need to understand is that ALL pl/sql is executed on the middle tier. None of your application code is executed on the client. The actual client to the database (for Forms) is the middle tier. The user is not actually the "client". This is probably part of your problem. If not yet, it likely will be once your fully deploy your code and test from a remote machine.
It is unclear exactly what you are doing. If you are trying to interact with a web page from a Forms application, use Java Script integration. You will need to be on at least 184.108.40.206 in order to do this successfully. Information on how to do this can be found in the Forms Deployment Guide.
That said, you should really consider upgrading to a Supported Forms version.