Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling a web page from a button on a form

Status
Not open for further replies.

jeannie322

Programmer
May 18, 2001
25
0
0
US
Hey everyone, we finally figured out how to place a button on a form that will call a web page (internally or externally) and now I have encountered a new problem..
A folder that is referenced in teh hyperlink has an " ' " in it. This is causing problems in the compilation of the form. I dont think I can use the REPLACE function, but if anyone has ANY ideas, please let me know!! Thanks!!

Here is the PL/SQL code for the link behind the button. The FSD Managers' Web Page is where we are having the problems. It doesnt matter about the spaces, only the apostrophe. Can anyone please take a look and let me know if you can help??

DECLARE
NS_ID PLS_INTEGER;
ConvID PLS_INTEGER;

BEGIN
ConvID := DDE.Initiate('NSShell',' -- Service,Topic
-- From Netscape 4.02 onwards the service is called NSShell instead of
--NETSCAPE
DDE.EXECUTE(ConvID,'"'||'\\XXXXXXXXX\XXXXXXXX\FSD Managers' Web Page\XXXXX\XXXXX.htm'||'"',5000);

EXCEPTION

WHEN DDE.DMLERR_NO_CONV_ESTABLISHED THEN -- If Netscape is not already open
NS_ID := DDE.APP_BEGIN('C:\PROGRA~1\NETSCAPE\Communicator\PROGRAM\netscape.exe', DDE.APP_MODE_NORMAL);
-- Replace this string with the complete path equired to execute netscape on your machine
ConvID := DDE.Initiate('NSShell',' DDE.EXECUTE(ConvID,'"'||'\\XXXXXXXXX\XXXXXXXX\FSD Managers' Web Page\XXXXX\XXXXX.htm'||'"',5000);
WHEN DDE.DDE_APP_FAILURE THEN
MESSAGE('Could not Open Netscape.');
WHEN DDE.DMLERR_SYS_ERROR THEN
MESSAGE('A system error has occurred. Shutdown
application and try again.');
WHEN DDE.DMLERR_NOTPROCESSED THEN
MESSAGE('Cannot Process Request');
WHEN DDE.DMLERR_DATAACKTIMEOUT THEN
MESSAGE('Data Ack. Timeout');
WHEN others then MESSAGE('Unknown failure');

END;
 
To use quotes within string literal you should duplicate them:

SQL> var a varchar2(10)
SQL> exec :a := '''';
SQL> print a

A
--------------------------------
'
 
I am not sure if I got that Sem, but I got it working. I took the easy way out. I created a web page & then redirected it to the web site that I wanted it to go. So now when you click on the button it will go to the web page I created, but it redirects automatically to the other site, so the user doesn't even see that. It was a lot easier & faster than sitting around searching all day. I got the desired effects. Thanks for your help though!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top