In which part of the page i can write java script

Hi
I'm new with ADF and web development
I have a java script function that show a tooltip.
This is the function:
*function positionTip(evt) {*
*     if (!tipFollowMouse) {*
*          standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body*
*          mouseX = (ns5)? evt.pageX: window.event.clientX + standardbody.scrollLeft;*
*          mouseY = (ns5)? evt.pageY: window.event.clientY + standardbody.scrollTop;*
*     // tooltip width and height*
*     var tpWd = (ie4||ie5)? tooltip.clientWidth: tooltip.offsetWidth;*
*     var tpHt = (ie4||ie5)? tooltip.clientHeight: tooltip.offsetHeight;*
*     // document area in view (subtract scrollbar width for ns)*
*     var winWd = (ns5)? window.innerWidth-20+window.pageXOffset: standardbody.clientWidth+standardbody.scrollLeft;*
*     var winHt = (ns5)? window.innerHeight-20+window.pageYOffset: standardbody.clientHeight+standardbody.scrollTop;*
*     // check mouse position against tip and window dimensions*
*     // and position the tooltip*
*     if ((mouseX+offX+tpWd)>winWd)*
*          tipcss.left = mouseX-(tpWd+offX)+"px";*
*     else tipcss.left = mouseX+offX+"px";*
*     if ((mouseY+offY+tpHt)>winHt)*
*          tipcss.top = winHt-(tpHt+offY)+"px";*
*     else tipcss.top = mouseY+offY+"px";*
*     if (!tipFollowMouse) t1=setTimeout("tipcss.visibility='visible'",100);*
My ADF page source code is
*<?xml version = '1.0' encoding = 'windows-1252'?>*
*<page xmlns="http://xmlns.oracle.com/uix/controller"*
xmlns:ui="http://xmlns.oracle.com/uix/ui"
xmlns:data="http://xmlns.oracle.com/uix/ui"
xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
xmlns:html="http://www.w3.org/TR/REC-html40" expressionLanguage="el"
xmlns:myTemplate="selfservice">
*<templates xmlns="http://xmlns.oracle.com/uix/ui">*
*<templateImport source="mainTemplate.uit"/>*
*</templates>*
*<content>*
*<dataScope xmlns="http://xmlns.oracle.com/uix/ui">*
*<provider>*
*<!-- Add DataProviders (<data> elements) here -->*
*</provider>*
*<contents>*
*<document>*
*<metaContainer>*
*<!-- Set the page title -->*
*<head title="General Manager"/>*
*</metaContainer>*
*<contents>*
*<body>*
*<contents>*
*<form name="form0">*
*<contents>*
*<myTemplate:SelfService title="General Manager">*
*<contents/>*
*<tabs/>*
*<pageButtons/>*
*<globalButtons/>*
*<pageHeader/>*
*<start/>*
*<end/>*
*<about/>*
*<copyright/>*
*<privacy/>*
*<corporateBranding/>*
*<productBranding/>*
*</myTemplate:SelfService>*
*<formValue name="${bindings.statetokenid}" value="${bindings.statetoken}" id="_uixState"/>*
*<table model="${bindings.HrsVEmpPhonesView1}" id="HrsVEmpPhonesView13" partialRenderMode="multiple" partialTargets="_uixState" showAll="yes" width="900">*
*<contents>*
*<column>*
*<columnHeader>*
*<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.HrsVEmpPhonesView1,'EmpNameAr')}"/>*
*</columnHeader>*
*<contents>*
*<textInput model="${uix.current.EmpNameAr}" columns="10" readOnly="true" onMouseOver="&quot;showTooltip(event,'This is a tooltip with a transparent shadow effect. Can you see the letters underneath the shadow?');return false&quot;"/>*
*</contents>*
*</column>*
*<column>*
*<columnHeader>*
*<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.HrsVEmpPhonesView1,'JobDescr')}"/>*
*</columnHeader>*
*<contents>*
*<textInput model="${uix.current.JobDescr}" columns="10" readOnly="true"/>*
*</contents>*
*</column>*
*<column>*
*<columnHeader>*
*<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.HrsVEmpPhonesView1,'PhoneExt')}"/>*
*</columnHeader>*
*<contents>*
*<textInput model="${uix.current.PhoneExt}" columns="10" readOnly="true"/>*
*</contents>*
*</column>*
*<column>*
*<columnHeader>*
*<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.HrsVEmpPhonesView1,'CntCellPhone')}"/>*
*</columnHeader>*
*<contents>*
*<textInput model="${uix.current.CntCellPhone}" columns="10" readOnly="true"/>*
*</contents>*
*</column>*
*<column>*
*<columnHeader>*
*<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.HrsVEmpPhonesView1,'CntHomePhone')}"/>*
*</columnHeader>*
*<contents>*
*<textInput model="${uix.current.CntHomePhone}" columns="10" readOnly="true"/>*
*</contents>*
*</column>*
*<column>*
*<columnHeader>*
*<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.HrsVEmpPhonesView1,'IaigcEmail')}"/>*
*</columnHeader>*
*<contents>*
*<textInput model= "${uix.current.IaigcEmail}" columns="10" readOnly="true"/>*
*</contents>*
*</column>*
*</contents>*
*<tableSelection/>*
*</table>*
*</contents>*
*</form>*
*</contents>*
*</body>*
*</contents>*
*</document>*
*</contents>*
*</dataScope>*
*</content>*
*<handlers>*
*<!-- Add EventHandlers (<event> elements) here -->*
*<event name="goto sort" source="HrsVEmpPhonesView13">*
*<invoke method="handleTableUiEvent" javaType="oracle.cabo.adf.rt.AdfUtils">*
*<parameters>*
*<parameter javaType="oracle.adf.model.binding.DCIteratorBinding" value="${bindings.HrsVEmpPhonesView1Iterator}"/>*
*<parameter javaType="oracle.cabo.servlet.expl.ControllerImplicitObject" value="${uix}"/>*
*</parameters>*
*</invoke>*
*</event>*
*<event name="select" source="HrsVEmpPhonesView13">*
*<set target="${bindings.HrsVEmpPhonesView1Iterator}" property="currentRowIndexInRange" value="${ui:tableSelectedIndex(uix, 'HrsVEmpPhonesView13')}"/>*
*</event>*
*</handlers>*
*</page>*
I want to add this function to my page
In which part exactly i can write this function
thanks in advance

To add to this, if you prefer you can separate your JavaScript from your JSF pages.
Add a folder (I named mine 'js') to your application's ViewController project's public_html folder.
Via JDeveloper, create a new JavaScript file inside your newly created folder and place your JavaScript functions inside it.
You can then 'load' the .js file using the method Shantala described, with the addition of an added 'source' property to the af:reference tag.
(This can also be a URI reference to a JavaScript file hosted on a web server)
<f:facet name="metaContainer">
  <af:resource source="/js/myJsFile.js" type="javascript"/>
</f:facet>The benefits of this 'split' are cleaner JSF page source and also code-highlighting and formatting within the .js file making finding and fixing bugs in your JavaScript much easier.
It appears however, that when using <af:resource> to load scripts, once the page has been submitted even once, the JavaScript is no longer available to the page. Which isn't very useful.
A solution is to use <trh:script>.
Add xmlns:trh="http://myfaces.apache.org/trinidad/html" to your <jsp:root> tag and install the library.
then in place of the above code use:
<f:facet name="metaContainer">
  <trh:script id="script1" source="/js/myJsFile.js"/>
</f:facet>Now after a page submit the JavaScript still functions.
Edited by: Matthew Carrigy on 12/08/2009 10:39

Similar Messages

  • How to I print a center footer which includes the word "Page" as part of the Page # of #?

    I want to print out multiple pages when I go to a specific URL and I want to also print a custom center footer which actually prints out the word Page as part of the Page # of #, normally if you choose the specific Page # of # you only get printed out as an example 1 of 2, it does not cause the word Page to be included in the printout?
    a

    Hi Nes,
    This is the second time you are posting a variation on this question.
    I was about to so NO YOU CAN'T...
    but then I thought...
    It is possible to print just parts of a front panel but it is a lot easier to do the things others have suggested.
    If you really want to print just a part of the FP you will have to do a lot of coding and the GUI will do some strange things in the process.
    I will outline the process and leave the code as an exercise for the reader.
    Using property nodes determine where on the FP the objects of interest are located.
    Again using property nodes, move the objects around on the FP so that they are grouped together and sized such they fit on a printed page.
    Using property nodes adjust the screen size origin etc so only
    the objects of interest are now visable.
    Using.....nodes print only the visable part of the screen.
    Using....nodes put everything back where is was when you started!
    Like I said, this is not easy.
    The simplest solution was suggested by BJD who said group the objects of interest on a tab page, use an invoke node to get the image and then display it on the FP of a sub-VI set to print on completion. That method will let you quickly add new interesting objects to the print out without having to change the sub-VI.
    Trying to help,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • The main part of the safari page is grey and won't respond/can't type in any commands.  I can move back through the previous pages, and even open new ones via the URL, but can't get onto the main part of the page and I can't get onto the 9 page option. !?

    The main part of the safari page is grey and won't respond/can't type in any commands.  I can move back through the previous pages, and even open new ones via the URL, but can't get onto the main part of the page and I can't get onto the 9 page option. !?
    Help, please.

    Try clearing Safari's cache : Settings > Safari > Clear Cache (and Clear History)
    If that doesn't work then try closing Safari completely and then re-open it : from the home screen (i.e. not with Safari 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Safari app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    A third option is a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • How can I print just a part of the page and not the full page with Adobe Reader v 10.1.2?

    how can I print just a part of the page and not the full page with Adobe Reader v 10.1.2? I need to print a engineering print with lot of information but information is too small in letter size and I don't have a plotter.

    Two ways to print a portion of a page: zooming or using the Snapshot Tool.
    ZOOMING:
    Zoom into the area you want to print.
    Click the Print icon.
    Under "Pages to Print", make sure "Current view" is selected under "More options" (you may need to click "More options" to open it).
    If you aren't satisfied with the preview, try clicking "Fit" under the Size button.
    SNAPSHOT
    Choose Edit > Take A Snapshot.
    Drag a rectangle around the area you want to print. 
    Click the Print icon.
    Under "Pages to Print", make sure that "Selected Graphic" is selected under "More options".
    To enlarge the snapshot to fit the sheet of paper, choose "Fit" under the Size button.
    Hope this helps!

  • When I go on a song on my music on my iPod touch 4th gen I can no longer get the bar across the top of the screen which allows you to change which part of the song you are up to, how do I get it back?

    when I go on a song on my music on my iPod touch 4th gen I can no longer get the bar across the top of the screen which allows you to change which part of the song you are up to, how do I get it back?

    hello, please install the search reset addon - it will revert the most common customizations those adware programs do in firefox back to the default: https://addons.mozilla.org/firefox/addon/searchreset/

  • I want to skip some html code part when refersh the page, how can we know

    Hi,
    i want to skip some html code part when refersh the page, how can we know when we pressed refresh button or F5 key
    thanks in advance....

    There's not really any simple way to do this. Maybe tracking the page the user should be one from every page in the site and if the page being accessed is the same as the last one accessed, assume it was a refresh.

  • I'd like to remove a thin line that is part of the page design in one of Aperture's photo books.  I can't seem to make it happen.  Any suggestions?

    I'd like to remove a thin line that is part of the page design in one of Aperture's photo books.  I can't seem to make it happen.  Any suggestions?

    The mouse that came with my Mac does not have a right click feature. When I try to highlight and click, it just opens the link I don't want anymore. What I want to do is remove unwanted links from the top bar. For example, I no longer use GoodSearch or myEarthLink, but I can't delete them. There are also some links that never should have found their way up there, and I don't know how they ended up there, and I can't remove them either. I've read through a ton of questions and answers, and I can't find one that addresses the problem. With my Safari browser, all I have to do to remove an unwanted link is to click and drag it to the trash. It doesn't appear to work that way with Firefox, to my chagrin. I hope this better explains my question. Maybe that will give you a better insight into a solution.

  • Opening iTunes from Windows XP desktop - can only see part of the page

    I have installed and uninstalled the latest iTunes on my Toshiba laptop with Windows XP with a webshots wallpaper. Only part of the page comes up. Can anyone help me with why only part of the page comes up. I'm very frustrated.

    Open the Control Panel, click on Displays, and change the monitor's resolution to at least 1024 by 768.
    (37316)

  • In Pages, how can I make one page have one column on part of the page and two columns on part of the page?

    What I am trying to achieve is a page with one column for all the text I write, but I also want to show two tables (one placed beside the other, not underneath the other) so on the part of the page where I am showing these tables, I would like to have two columns. Is this possible? Underneath the tables, there is more text that should be in one column only.

    Use a layout break.

  • The toolbar in the adobe app that allows you to choose the brightness level and the page layout doesn't hide. Because of that, i of course am unable to read the top part of the page...[Android]

    The toolbar in the adobe app that allows you to choose the brightness level and the page layout doesn't hide. Because of that, i of course am unable to read the top part of the page. I cannot find anything in the settings that will make it go away. What do i do? I use Samsung Ace.

    What is the Acrobat DC version and the android version that you are running? You can find the Acrobat version here: How to find the Acrobat DC version installed on your Android device

  • Split Screen:  2 parts of the page at once

    I'm working on a long page - several hundred lines - and
    would like to be able to split the screen so I can see two parts of
    the page at once. Does anyone know how?
    Thanks
    Note: This is in Code View.

    A few remarks:
    - place the cfparam code lines out of the cfdocument tag;
    - remove the link tag from within cfdocument. The link tag
    may only appear in the head section of the page;
    - remove the cfoutput tag. It is apparently unnecessary;
    - remove the long comment lines <!------------ ...
    -------------->. If you need to break the document up into
    sections, use the cfdocumentsection tag. A previous thread contains
    an
    example of using cfdocumentsection and cfdocumentitem tags for
    section and page flow.
    added: You should consider installing the
    Coldfusion
    MX 7 hotfixes if you haven't done so yet. One of the fixes is
    for cfdocument's text cut-off problems.

  • Error When inserting Content Query Web part onto the page

    i am using share point 2010 and when i am trying to insert content query web part onto the page i am getting the following error
    i checked the correlation id in the logs file but could not find anything useful in it.
    please suggest why this problem occuring everytime when i try to insert content query webpart onto the page

    Hi,
    Check the correlation id in your logging files are the best way to investigate.
    Did you check these files with "SharePoint ULS Log viewer". Maybe, that will be more easy for you to get the correlation Id.
    Moreover, check the account's permissions with which you try to insert your webpart.
    Regards.
    Gilles Martinez
    Twitter
    Blog
    Please mark as helpful/answer if this resolved your post

  • How do I copy different parts of the page into separate pdf files?

    I have Adobe Acrobat 9 Pro and an assortment of very large pdfs that I want to make into about a thousand individual pdfs.  The pages contain text and I want to be able to copy parts of the page into separate different pdfs.  It would be really nice if I could split up the page into the required sections by highlighting all the different sections on the page and then save each section to individual pdfs all at once.  Acrobat has so many features that I am hoping that it can do something like this.  Thanks  Anewbie282

    With the number of pages you are talking about, there is no real easy solution. However, try extracting the page(s) you want in a new file. After the extracted file exists, try using the object select tool to remove the parts you do not want. You might find using the redaction tool to zero out the parts you don't want might work better. Unfortunately, a PDF is not a word processor type data file and the editing is likely not going to be easy.

  • Hi, Over a week now, my Firefox browser has been aligning the info on the page to the right of the page. This makes it difficult to see the rest of the contents on the page. Can you help?

    Question
    Hi, Over a week now, my Firefox browser has been aligning the info on the page to the right of the page. This makes it difficult to see the rest of the contents on the page. Can you help?
    Regards
    Femworth65

    my money is on a hardware issue

  • HT1444 How can I upgrade the OS on my 5 year old MacBook Pro 17.  It is currently running 10.4 (Tiger).  I have an IMac 27 running Lion but have Snow leopard discs which came with the purchase.  Can these be used to upgrade?

    How can I upgrade the OS on my 5 year old MacBook Pro 17.  It is currently running 10.4 (Tiger).  I have an IMac 27 running Lion but have Snow leopard discs which came with the purchase.  Can these be used to upgrade?

    Buswab wrote:
    How can I upgrade the OS on my 5 year old MacBook Pro 17.  It is currently running 10.4 (Tiger).  I have an IMac 27 running Lion but have Snow leopard discs which came with the purchase.  Can these be used to upgrade?
    If they are the grey discs which came with the iMac, then they will be machine specific and will not work on the MBP anyway. You will need to purchase a retail copy of Snow Leopard from the Apple Store for about $29 and upgrade from that. I presume your MBP is Intel and not G4.
    Good Luck
    Pete

Maybe you are looking for

  • Outgoing payment - rouding differences

    Hi, There is a possibilité to customize general accounts for rouding differences (transaction RDF) in the Outgoing payment global settings customizing block. Does anyone know in which case it is used? Do you have any illustration for this? Thanks for

  • Command is not being executed successfully.

    Hello, I am studying how integrating a Report builded using Reports Builder with JDEV, because when I run from JDEV my JSP file which contains Reports, I am not manage get success. Then I found a document http://otn.oracle.com/docs/products/reports/h

  • My iPad is very slow how do I clean it up or make it run better?

    My iPad is very slow how do I clean it up or make it run better?

  • What does MyBookLive do?

    I haven't used iTunes in a bit and noticed the 'MyBookLive' tab. I clicked on it to see what it was/ what it does but it's just been loading for a while now and it doesn't show me anything. So my question is this: What does MyBookLive do? Also, is th

  • Getting Premiere Elements 11 to install on my upgraded OS (Vista to Win 7)

    I recently upgraded my PC to run Win 7 (64 bit).  I did a clean install of the OS so I need to reload my software.  I purchased PhotoShop Elements 11 with Premiere last year.  Both ran well on my Vista 64 bit OS.  PhotoShop installed with out a probl