error in calling html pages [message #278214] |
Fri, 02 November 2007 07:07 |
realoneomer@gmail.com
Messages: 25 Registered: September 2007 Location: Islamabad
|
Junior Member |
|
|
Hi
Every one
I am calling Html pages from Oracle Forms using the followimg code but it is not working can any one tell me how to call the Html pages from Oracle forms i have place all the Html files in Help(D:\DevSuiteHome_1\Help) directory
declare
formname varchar2(80) := lower(name_in('System.Current_form'));
blockname varchar2(80) := lower(name_in('System.Cursor_block'));
itemname varchar2(80) := lower(name_in('System.Cursor_item'));
topicid varchar2(80) := itemname;
begin
web.show_document('file://D:\DevSuiteHome_1\Help\'||topicid||'.html','_blank');
message(''||''||formname||' '||blockname||' '||itemname||' '||topicid);
End;
Thanks
Omer Shahzad(realoneomer@gmail.com)
[Updated on: Fri, 02 November 2007 07:09] Report message to a moderator
|
|
|
|
|
|
Re: error in calling html pages [message #279947 is a reply to message #279543] |
Mon, 12 November 2007 00:57 |
realoneomer@gmail.com
Messages: 25 Registered: September 2007 Location: Islamabad
|
Junior Member |
|
|
This is the code which i am using to call Html page
PROCEDURE Display_Help
(
PN$Scope in PLS_INTEGER
)
IS
LC$Form Varchar2(80) := Lower( Name_in( 'system.current_form' ));
LC$Block Varchar2(60) := Lower( Name_in( 'system.cursor_block' ) );
LC$Item Varchar2(60) := Lower( Name_in( 'system.cursor_item' ) );
LC$TabCan Varchar2(60) ;
LC$Path Varchar2(128) ;
LC$Cmd Varchar2(128) ;
Item_id Varchar2(128) :=LC$Item;
CurrItem Varchar2(30) := get_item_property(:system.cursor_item, item_name) ;
FileID Varchar2(128) ;
TopicId Number ;
VPath Varchar2(50) ;
LC$Formname Varchar2(128) ;
--
--cursor c1
--
cursor c1 is
select a.descr
from MmsPath a, MmsProgName b
where a.Co = :B0.Co
and b.ProgName = :B0.HelpFile
and a.Co = b.Co
and a.Path = b.Path ;
--
BEGIN
--------------------------------------------------------
-- Only used to test on a Developer Suite environment --
--LC$Path := 'file://D:\DevSuiteHome_1/tools/web/hrm_help/' ;
--------------------------------------------------------
select Unique(upper(lower(substr(LC$block,-length(LC$Block),3)))) into lc$formname from AdmFormFields;
LC$TabCan := GET_ITEM_PROPERTY(LC$Item , ITEM_TAB_PAGE ) ;
LC$Item := Replace( LC$Item, '.', '_' ) ;
--checking if some error is shown
--
if :B0.LastError is not null then
--
--showing help for the specific error messages
--error number will be passed as parameter.
--
ShowHelp(:B0.LastError) ;
--
else --if :B0.LastError is not null
--
--if cursor is in some text field
--
if CurrItem is not null then
--
-- openning cursor c1 for getting physical path of the
-- help file.
--
open c1 ;
fetch c1 into VPath ;
close c1 ; -- closing cursor c1 ;
--
--Calling Function for getting help topic's ID
--stored against a particular field of block.
---
--Parameters for this procedure are
--
--1. Block Name
--2. Field Name
--
TopicID:= GetHelpId(get_item_property(:system.cursor_item, block_name), CurrItem) ;
FileID := get_item_property(:system.cursor_item,ITEM_NAME) ;
-- Copy(HELPID, :System.Cursor_Item);
--
--using windows api to display the help of the specific topic
--
-- win_Api_shell.winhelp(VPath||:B0.HelpFile||'.hlp',x, win_api.help_context) ;
--
end if ; --if curritem is not null
--
end if ; --if :B0.LastError is not null
-- Build the calling url --
LC$Path := VPath;
--LC$Cmd := LC$Path||LC$formname||'.html' ; -- dialog name
LC$Cmd := LC$Path||LC$formname||'.html' ;
If PN$Scope = 1 Then
LC$Cmd := LC$Cmd || '#' ||TopicID ; -- item bookmark
End if ;
If PN$Scope = 2 Then
LC$Cmd := LC$Cmd || '#' || LC$Block ; -- block bookmark
End if ;
If PN$Scope = 3 Then
LC$Cmd := LC$Cmd || '#' || LC$TabCan ; -- tab bookmark
End if ;
-- Display the html page --
Web.show_document(LC$Cmd, '_blank') ;
--HOst(LC$Cmd);
Clear_message ;
END;
when i run the form and after firing the trigger F1 it opens the new html page but it displays ("The Page Cannot be Found) and in address bar it shows "http://omer:8889/forms/HRM.html"
Now what i have to do
Omer Shahzad
[Updated on: Mon, 12 November 2007 01:01] Report message to a moderator
|
|
|
|
|