Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED]How to call a query present in a fex from html/javascript...
Go
New
Search
Notify
Tools
Reply
  
[CLOSED]How to call a query present in a fex from html/javascript...
 Login/Join
 
Guru
posted
Hi,

I have a textbox wherein multiple Id's of 4 digits can be entered separated by commas and I can enter emp id and emp id or mgr id and mgr id at any point in time and should throw an error if I enter an emp id and a mgr id at the same time.
Iam using this query below and if the count is greater than 1, then I need to show an alert message saying that it is an invalid entry.

ENGINE oracle SET DEFAULT_CONNECTION instance1
SQL SQLORA PREPARE SQLOUT FOR
select COUNT(distinct(title)) from (select distinct title,type from table1
where id in ('ABCD','BCD1','CDE1')and title is not null );
END

Could anyone please let me know how can I connect the html/javascript to hit this query and throw an alert message as soon as they enter the emp id and the mgr id's.

This is really urgent and please help me on this.

Regards!

This message has been edited. Last edited by: info4pal,
 
Posts: 270 | Registered: October 30, 2014Reply With QuoteReport This Post
Guru
posted Hide Post
I would recommend coming up with a different design. I would advise against implementing a SQL request inside of javascript as that is not secure and anyone could read that and get connection information.


WebFOCUS 8.1.05
 
Posts: 495 | Registered: January 04, 2008Reply With QuoteReport This Post
Guru
posted Hide Post
Hi,


Thanks for the quick response MattC.
Actually Iam not trying to implement the sql query inside the javascript but am having the sql query inside the fex file and if the count is greater than 1,then I need to throw an alert message saying that it is invalid.

I need some help on how do i connect the textbox in javascript to hit this query and once if the count is greater than 1 ,then it should again go back to the html page and pop up an alert message window.

Please help me on this.

Thanks!
 
Posts: 270 | Registered: October 30, 2014Reply With QuoteReport This Post
Virtuoso
posted Hide Post
You may need to look into JavaScript's AJAX to implement an asynchronous call to the .fex that performs the validation, and once the request is done you'll use JavaScript to parse the XML result of your query. Just make sure your .fex returns results in XML (check documentation for ON TABLE PCHOLD FORMAT XML).

On a different note, I've noticed that many of your recent requests are of a "Very urgent" nature. Focal Pointers are very helpful, open to share their experience and regularly go to great extents to illustrate approaches and techniques (I've learnt lots from them) but as with many other forums' supporters, are not in the business of solving someone else's "Very urgent" needs as they have their own to deal with. I would advise you to get in touch with IBI Tech Support in order to get the kind of priority help you need in situations like these.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Take a look at the technique Rifaz recently shared here: [SHARING] Those who interested AJAX and WebFOCUS.

It may give you some very good hints at solving your need.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Reply With QuoteReport This Post
Guru
posted Hide Post
Hi,

Thanks a lot njsden for the inputs.
Sure I will try reaching to IBI tech support for any urgent issues moving forward.

Regards!
 
Posts: 270 | Registered: October 30, 2014Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED]How to call a query present in a fex from html/javascript...

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.