Problem in html and using javascript

Hello,
I want to create a html page that calls a javascript file(.js) using the HTML portlet. The problem is that i do not how to specify the location of the javascript (src="location/name of .js file")as i do not know in which directory does the HTML portlet resides.
Please give me some guidance on this.
Thanks in advance.

If you want to store the .js file on the file system, the base directory is <ORACLE_HOME>/portal. For example, on Windows, if your mid-tier Oracle Home is d:\iasv2, your base directory will be d:\iasv2\portal. The relative link "/location/myjs.js" (note the leading slash) would resolve to "d:\iasv2\portal\location\myjs.js".
If you want to store the file in the Portal repository, the path is "/<DAD>/docs/PAGE/<pagepath>/<docname>", where <DAD> is your database access descriptor (e.g."/pls/portal"), <pagepath> is the path to the page on which the document is stored, starting with the name of the root page of the page group. So if your DAD is "/pls/portal", your root page is called "mypages" (the internal name is used, not the display name), and the document is stored on a page under the rootpage called "myscripts", the href will be "/pls/portal/docs/page/mypages/myscripts/myjs.js".
You can also specify a path relative to the current page. So, in the above example, if your HTML portlet is on "mypages", your href can be simply "myscripts/myjs.js".
If this is release 1 of Portal (3.0.x), use /<DAD>/docs/FOLDER/<folderpath>/<docname> as the path to the document (e.g. "/pls/portal/docs/folder/myfolders/myscripts/myjs.js").
Regards,
Jerry
PortalPM

Similar Messages

  • Hide an HTML button using javascript

    Hi,
    I need to hide an html buttton using javascript. I have an radio button with values "YES" and "NO". If is select NO then i need hide the button without refreshing the page. Can anyone suggest me how to hide an button using javascript.
    Thanks
    Prashanth

    Prashanth,
    The exact solution will vary based on a few factors. The basic idea is to place an event handler on the radio button item that calls a function to hide/show the button. You might also want to call that function when the page loads too.
    If you put an example page on apex.oracle.com and provide the workspace/username/password I'll take a look. You can create a new account for this purpose.
    Regards,
    Dan
    Blog: http://DanielMcGhan.us/
    Work: http://SkillBuilders.com/

  • Html db use javascript

    Hi everyone,
    But using HTMLDB conditional display functionality, the buttons are there or not but not disable. I mean disable that you see the button but you can't launch a process because you can't access it.
    Thanks a lot. Bye.

    Hi Eric;
    We have an HTMLDB application with good amount of JavaScript. It has not caused us any problems and given us allot of capabilities. One of them is showing the total value of a series of fields as data is entered.
    We are internally having the debate on using JavaScript to replace built-in HTMLDB functionality such as field validation. One plus for JavaScript is it happens without HTMLDB having to render the page again. On the side of HTMLDB, it already does it “Out of the Box” very nicely with good UI
    As fare as “Enable and disable buttons” we have done this using HTMLDB conditional display functionality.

  • Problem accessing HTML pages using Tomcat 4

    I am very new to programming. I have created an html file (ThreeParamsForm.html) and placed it in development directoy. I am unsure of how to access that file. When i am typing http://localhost/ThreeParamsForm.html it is giving me HTTP Status 404 error. I have tried using servlets in similar way it is working fine. Please help.....

    did you include the port number if other than 80 ?
    i.e. http:\\localhost:8080\whatever

  • Problem in Developing and Using ADF Faces Skins sample

    sample.jspx dose not have “Select Skin” box as the document shown.
    I am trying the sample project downloaded from sample WAR file - adffaces_skin.war in article “Developing and Using ADF Faces Skins”.
    In paragraph “Changing the Color Schema of a Skin”
    sample.jspx has a “Select Skin” box to allow user to select “Simple” or “MyCompany”. (in JSP Visual Editor)
    However, it does not show on the project built from downloaded from sample WAR file (adffaces_skin.war).

    After reading the whole document, I realize it is my mistake.
    The box will be created after all user skins setting.
    The sample works.
    Only thing need to remind is for later version Jdeveloper, Application Worksapce in only for early version Jdeveloper. All the version after 10g 1.3 EA1, Only have Application.

  • To know the Status code of a HTML page using Javascript

    To know the Status code of a HTML page using Javascript

    Hello,
    I am not sure to understand, which status are you talking about? The HTTP Status?
    If your javscript is executed it is more or less sure that the HTTP Status is 200 since the request is back to the browser.
    or are you talking about this is in the context of a XMLHTTPRequest call ?
    Regards
    Tugdual Grall

  • Problem in HTML and HTMLCSS format of reports

    Hi
    I'm using Report Builder 10.1.2.0.2 to build a tabular report, in the repot preview everything is ok but in the real time I have two problems :
    1- When I try to generate html file or access the report with desformat=html some graphical formats like lines and background colors are gone!. When I see the source of the generated HTML file the tables border is 0. I changed the border to be 1px with solid style and black color but nothing happened.
    2- When I try to generate htmlCSS file or access the report with desformat=htmlCSS the graphics is there but when I print the report there is some shift between the generated page and the printed page i.e: the printed pages are not the same like the report's pages. I added some code in the after page property as a page break but nothing changed
    Any help will be appreciated
    Thank you in advance

    Hi
    The best way to organize data and images to get them next to each other is to use a table (no borders) in your RTF template. Create a two celled table and drop the image into one and the text next to it.
    Regards
    Tim

  • Can I make an Imageboard in a HTML page (using JavaScript)?

    Hello all.
    Just like to say that this is my first post on the Adobe forums!
    Anyways, I've started a website project in Dreamweaver CS6 (full version) and will probably be using Photoshop (CS6) for some parts of the site too. It's gonna be pretty basic but I want to make an imageboard (with JavaScript? I'm not sure...) where users who have logged in can post an image on the feed with a comment/caption to go with it.
    How can I do this? Can anyone point me to a good tutorial on how to make this? Do I do it with JavaScript on the HTML page? (P.S. I am mildly experienced with HTML).
    Thanks in advance!

    Unfortunately, there isn't anything in DW that can do this type of thing for you, although if you were to learn php and mySQL you definitely could use DW to create a site with those types of features.
    There's actually quite a bit that goes into that kind of thing, more than just basic code, you need to think about security especially if you plan to allow someone to upload files, potentially infected with viruses, to your server.
    If you're talking about creating a basic forum (being able to start topics, post pics and comments), there are a lot of free and paid solutions available online. Certain hosting companies even give you basic forums you can add to your site by following the instructions on their pages.
    Unless you have a lot of time on your hands to learn all the ins and outs of PHP and the security necessary to keep your site and server safe, I'd suggest going that route.

  • Problem reading html and rtf emails

    When I send emails from my pc to my iPhone 5 in html or rtf format they are unreadable as all of the coding instructions are also included in the text when it appears on screen. This was never a problem with my iPhone 4 so I am not sure what has changed. I have a business contact who has had similar problems in the recent past with my emails so I know it is not just me.
    I have tried sending html emails from other pc's in the office to my phone and they are all readable so perhaps it is something in the set up of my pc that is causing this issue. As my office is changing over to iPhone 5's does anybody have any solution to what will become a very annoyinmg problem.
    Obviously I could send all of my emails in plain text but that doesn't really work for what I need to send, logo's / graphics etc.

    Hi
    The best way to organize data and images to get them next to each other is to use a table (no borders) in your RTF template. Create a two celled table and drop the image into one and the text next to it.
    Regards
    Tim

  • Problem pulling HTML region using AJAX

    Hi,
    I am using Ajax with Oracle apex, it pulls the report region ok, but when i try to pull the html region, it doesn't. I tried several different ways and in firefox, it does pull the html region but not also pulls the header and footer. On IE, it gives a javascript error.
    Is there any way to pull the HTML region from a page using AJAX on IE. I am using the htmldb_get.js's functions for ajax.

    see
    http://apex.oracle.com/pls/otn/f?p=11933:48
    working perfectly with latest version of apex on ie, ffox and opera.

  • Having a problem with threads and using locks

    I was hoping someone could give me some hits on getting my code to run properly. The problem I am having is I think my locks and unlocks are not working properly. Plus, for some reason I always get the same output, which is:
    Withdrawal Threads         Deposit Threads            Balance
    Thread 2 attempts $29 Withdrawal - Blocked - Insufficient Funds
    Thread 4 attempts $45 Withdrawal - Blocked - Insufficient Funds
    Thread 6 attempts $34 Withdrawal - Blocked - Insufficient Funds
    Thread 7 attempts $40 Withdrawal - Blocked - Insufficient Funds
                                    Thread 1 deposits $187          $187
                                    Thread 3 deposits $169          $356
                                    Thread 5 deposits $61           $417
    Press any key to continue...If someone can see the error I made and doesn't mind explaining it to me, so I can learn from it, I would appreciate that very much.
    /************Assign2_Main.java************/
    import java.util.concurrent.*;
    public class Assign2_Main
    {//start Assign2_Main
        public static void main(String[] args)
        {//start main
               // create ExecutorService to manage threads
               ExecutorService threadExecutor = Executors.newCachedThreadPool();
            Account account = new SynchronizedThreads();
            Deposit deposit1 = new Deposit(account, "Thread 1");
            Deposit deposit2 = new Deposit(account, "Thread 3");
            Deposit deposit3 = new Deposit(account, "Thread 5");
            Withdrawal withdrawal1 = new Withdrawal(account, "Thread 2");
            Withdrawal withdrawal2 = new Withdrawal(account, "Thread 4");
            Withdrawal withdrawal3 = new Withdrawal(account, "Thread 6");
            Withdrawal withdrawal4 = new Withdrawal(account, "Thread 7");
            System.out.println("Withdrawal Threads\t\tDeposit Threads\t\t\tBalance");
            System.out.println("------------------\t\t---------------\t\t\t-------\n");
            try
                threadExecutor.execute(withdrawal1);       
                threadExecutor.execute(deposit1);     
                threadExecutor.execute(withdrawal2);  
                threadExecutor.execute(deposit2);    
                threadExecutor.execute(withdrawal3);
                threadExecutor.execute(deposit3);       
                threadExecutor.execute(withdrawal4);
            catch ( Exception e )
                 e.printStackTrace();
                //shutdown worker threads
               threadExecutor.shutdown();
        }//end main
    }//end Assign2_Main/******************Withdrawal.java****************************/
    public class Withdrawal implements Runnable
    {//start  class Withdrawal
          *constructor
        public Withdrawal(Account money, String n)
             account = money;
             name = n;
        public void run()
        {//start ruin
             int newNum = 0;
                newNum = account.getBalance(name); 
               Thread.yield();
        }//end run
        private Account account;
        private String name;
    }//end  class Withdrawal/*******************Deposit.java***************/
    import java.util.Random;
    public class Deposit implements Runnable
    {//start class Deposit
          *constructor
        public Deposit(Account money, String n)
             account = money;
             name = n;
        public void run()
        {//start run
                try
                     Thread.sleep(100);
                   account.setBalance(random.nextInt(200), name);
                }// end try
                catch (InterruptedException e)
                  e.printStackTrace();
       }//end run
       private Account account;
       private Random random = new Random();
       private String name;
    }//end class Deposit/********************Account.java*****************/
    *Account interface specifies methods called by Producer and Consumer.
    public interface Account
         //place sum into Account
         public void setBalance(int sum, String name);
         //return  value of Account
            public int getBalance(String name);         
    } /**************SynchronizedThreads.java****************/
    import java.util.concurrent.locks.*;
    import java.util.Random;
    public class SynchronizedThreads implements Account
    {//start SynchronizedThreads
          *place money into buffer
        public void setBalance(int amount, String name)
        {//start setBalance
             // lock object
             myLock.lock();           
            sum += amount;
            System.out.println("\t\t\t\t" + name + " deposits $" + amount +"\t\t$"+ sum+"\n");       
               //threads are singnaled to wakeup
            MakeWD.signalAll();
              // unlock object                                                
            myLock.unlock();
           }//end setBalance
            *gets the balance from buffer
           public int getBalance(String name)
        {//start getBalance
             int NewSum = random.nextInt(50);
             //lock object
            myLock.lock();
            try
                 if(sum > NewSum)
                     //takes NewSum away from the account
                     sum -= NewSum;
                        System.out.println(name + " withdraws $" + NewSum +"\t\t\t\t\t\t$"+ sum+"\n");
                else
                     System.out.println(name +  " attempts $" + NewSum + " Withdrawal - Blocked - Insufficient Funds\n");                 
                     //not enough funds so thread waits
                        MakeWD.await();         
                //threads are singnaled to wakeup
                MakeD.signalAll();     
                }//end try
            catch (InterruptedException e)
                   e.printStackTrace();
            finally
                 //unlock object
                 myLock.unlock();
            return NewSum;     
         }//end getBalance
         private Random random = new Random();  
         private Lock myLock = new ReentrantLock();
         private Condition MakeD = myLock.newCondition();
         private Condition MakeWD = myLock.newCondition();
         private int sum = 0;
    }//end SynchronizedThreads

    You can also try to provide a greater Priority to your player thread so that it gains the CPU time when ever it needs it and don't harm the playback.
    However a loop in a Thread and that to an infinite loop is one kind of very bad programming, 'cuz the loop eats up most of your CPU time which in turn adds up more delays of the execution of other tasks (just as in your case it is the playback). By witting codes bit efficiently and planning out the architectural execution flow of the app before start writing the code helps solve these kind of issues.
    You can go through [this simple tutorial|http://oreilly.com/catalog/expjava/excerpt/index.html] about Basics of Java and Threads to know more about threads.
    Regds,
    SD
    N.B. And yes there are more articles and tutorials available but much of them targets the Java SE / EE, but if you want to read them here is [another great one straight from SUN|http://java.sun.com/docs/books/tutorial/essential/concurrency/index.html] .
    Edited by: find_suvro@SDN on 7 Nov, 2008 12:00 PM

  • Problem with constructors and using public classes

    Hi, I'm totally new to Java and I'm having a lot of problems with my program :(
    I have to create constructor which creates bool's array of adequate size to create a sieve of Eratosthenes (for 2 ->n).
    Then it has to create public method boolean prime(m) which returs true if the given number is prime and false if it's not prime.
    And then I have to create class with main function which chooses from the given arguments the maximum and creates for it the sieve
    (using the class which was created before) and returns if the arguments are prime or not.
    This is what I've written but of course it's messy and it doesn't work. Can anyone help with that?
    //part with a constructor
    public class ESieve {
      ESieve(int n) {
    boolean[] isPrime = new boolean[n+1];
    for (int i=2; i<=n; i++)
    isPrime=true;
    for(int i=2;i*i<n;i++){
    if(isPrime[i]){
    for(int j=i;i*j<=n;j++){
    isPrime[i*j]=false;}}}
    public static boolean Prime(int m)
    for(int i=0; i<=m; i++)
    if (isPrime[i]<2) return false;
    try
    m=Integer.parseInt(args[i]);
    catch (NumberFormatException ex)
    System.out.println(args[i] + " is not an integer");
    continue;
    if (isPrime[i]=true)
    System.out.println (isPrime[i] + " is prime");
    else
    System.out.println (isPrime[i] + " is not prime");
    //main
    public class ESieveTest{
    public static void main (String args[])
    public static int max(int[] args) {
    int maximum = args[0];
    for (int i=1; i<args.length; i++) {
    if (args[i] > maximum) {
    maximum = args[i];
    return maximum;
    new ESieve(maximum);
    for(int i=0; i<args.length; i++)
    Prime(i);}

    I've made changes and now my code looks like this:
    public class ESieve {
      ESieve(int n) {
       sieve(n);
    public static boolean sieve(int n)
         boolean[] s = new boolean[n+1];
         for (int i=2; i<=n; i++)
    s=true;
    for(int i=2;i*i<n;i++){
    if(s[i]){
    for(int j=i;i*j<=n;j++){
    s[i*j]=false;}}}
    return s[n];}
    public static boolean prime(int m)
    if (m<2) return false;
    boolean x = sieve(m);
    if (x=true)
    System.out.println (m + " is prime");
    else
    System.out.println (m + " is not prime");
    return x;}
    //main
    public class ESieveTest{
    public static int max(int[] args) {
    int maximum = args[0];
    for (int i=1; i<args.length; i++) {
    if (args[i] > maximum) {
    maximum = args[i];
    return maximum;
    public static void main (String[] args)
    int n; int i, j;
    for(i=0;i<=args.length;i++)
    n=Integer.parseInt(args[i]);
    int maximum=max(args[]);
    ESieve S = new ESieve(maximum);
    for(i=0; i<args.length; i++)
    S.prime(i);}
    It shows an error for main:
    {quote} ESieveTest.java:21: '.class' expected
    int maximum=max(args[]); {quote}
    Any suggestions how to fix it?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Opening HTML form using javascript

    Hi,
    I want a syntax or code in javascript for moving one HTML form to another HTML form. I have to designed the Registration form in HTML. If click the Submit button, then it goes to another form. I validation in javascript. so i want a code for this is in javascript
    I tried this codes
    location.href='path of file';
    and
    document.URL='path of file';
    But it didn't work properly.
    Can anyone help me pls.

    Java is not Javascript.
    try on a javascript forum

  • Having problemas at updating and using viber 2.1.5

    Good afternoon,
    I've been using Viber ever since I came over to the UAE five months ago. I hold a subscription with du and never had a problem except for some network performance issues not related to Viber itself.
    The fact is that I've been facing problems over the last couple of weeks and I've removed and reinstalled Viber 2.1.5 and it does not work. I've been prompted to reintroduce my local number and got an answer back telling me that I would receive a code over an SMS as if it were registered for the very first time. The SMS does not come through and I cannot activate the application.
    As a consequence of this, I can't use my contact list and I cannot get it up and running.
    I would appreciate if you could cast some light on the subject.
    Thanks in advance for your help.
    Best regards,
    Beny

    We are users like yourself here and not representatives of Apple or Viber. You need to make contact with Viber support and/or search the forum here. Many people have reported issues with Viber and there is a Viber representative that will often come here and make contact. If you search old posts, you may find some contact information in those posts for Viber as well.

  • Problem when flying and using Ipod

    Everytime I fly my ipod crashes. Has anyone experienced this before? How do I fix it?

    This is not an uncommon complaint. If you search these forums going back a ways you will find a decent number of people who have iPods that after getting up in the air stop working until the land again.
    The iPod is supposed to be good to some number of feet (10,000 maybe?) and airlines normally pressurize their cabins to be no more than the equiv of 8000 feet, but often less, so normally should be below the pressure levels for proper iPod use.
    But, yes, some people just seem to have ones that don't even like a few/several thousand feet of elevation. Not much you can do about it unfortunately other than buying another one for flight use (maybe a flash based Nano would hold enough for most plane rides).
    Patrick

Maybe you are looking for

  • Problems with Windows Vista for BPC, from Windows XP

    Hello, We have developed some templates in excel 2003 in SAP BPC for Windows XP and these work perfectly. But this templates in excel 2003 and with Windows VISTA makes a fault. The fault is: when the template is opened and you select a year (made wit

  • Extension Manager not finding After Effects CC

    Hey all, I have been having a bit of an issue in regards to Adobe Extension Manager. I just installed the new CC version, and wanted to install an extension to Adobe After Effects. However, it does not show up on the Extension Manager screen: As you

  • Definition of base class ByteArrayAsset was not found

    I was able to run through the developer guide to get several simple applications going, but I'm getting stuck when trying to compile a game (using amxmlc) that uses Flex-style embeds to embed bitmap graphics. The error I'm seeing is this: (I've inclu

  • System date issue

    Hi I have a java file which is reading data from datafile and insert into database. Now issue is upto 30 september(system date) program is working as expected. But after 30sept when system date chaned to 1st or second oct its not workin at all any id

  • Help needed for cin

    Hi, I have a program in C++ that controls an USB device with a lot of headers and C++ classes. I would like to control my device from Labview 7.0 so I was thinking about CIN. I have some questions to ask. First of all, VC++ and Labview are not on the