Hide Page Controls on Page Load with JavaScript

Good Morning, I am trying to use a peice of code that I found on another thread:
HTML Header
<script language="JavaScript1.1" type="text/javascript">
function setDisabled(PageItem) {
document.getElementById(PageItem).style.visibility = "hidden"
</script>
HTML Body Attribute
onLoad="javascript:setDisabled('P36_COMMS1_0');
The code works if I change the "onLoad" to "onClick" and click the control. But when I use it as written, it doesn't trigger when the page loads. Does anyone have any ideas?
Here is the original thread: http://forums.oracle.com/forums/thread.jspa?messageID=2760790&#2760790, but the thread didn't really relate to my question.
Donald

Hi Donald,
As the code is within a function block it is has to be called by something when the page loads.
The simplest method would to be ensure that you have a piece of javascript at the bottom of the page (ie, underneath the function and the field it refers to):
&lt;script type="text/javascript"&gt;
setDisabled('itemname');
&lt;/script&gt;When the browser loads this piece, because you haven't wrapped it within a function block, the code is executed immediately (hence needing to be loaded after the function and the field).
Andy

Similar Messages

  • Page opening hangs ,and loads with errors

    page opening hangs ,and loads with errors,
    terry.

    Terry,
    You need to be much more descriptive when posting. We have no idea what "page" you are referring to.

  • How to control Flash Player 10 with Javascript?

    Are there any turotials or examples of controlling Flash Player 10 from a web page with javascript?  I want the player to pop up when I mouseover a thumbnail image and play a short relevant flv file.  When the mouse moves away from the thumbnail the player should disappear.   I imagine I'm going to have something like
    <img src="thumbnail.jpg" onmouseover="javascript:  [call flv player with .flv name and parameters to autoplay with no controls )">
    but I don't know what the javascript code should be and I don't know how to embed the flv player in my HTML so the javascript code can call it. 
    Thanks for any help.
    Steve

    it would be nice if someone can suggest a solution.because i ve the same problem.
    Jon

  • Question about controlling embed quicktime object with javascript

    Hello,
    I am using javascript to control an embedded quicktime object on my website a la http://www.protofunc.com/2008/02/01/controlling-embedded-video-with-javascript-p art-i-quicktime/ .
    The problem I am having is with the movie.Stop() command. When I hit the pause button on the generic controller, it freezes the current frame. When I call the Stop() command, the movie goes white until it is resumed. Does the pause button do anything more than call "Stop()"?
    Thanks,
    Nick

    any luck with this? i am thinking of trying protofunc.
    fyi:
    i switched from SWF files to QuickTime H264, and have been trying to use the QuickTime/File/Save For Web feature on my movie promo web site.. all the movies play choppy on computers (desktops and laptops), but the technique works well on iPhones and iPads.. it is a bit unfair, IMHO, that apple can make trailers work so smooth on trailers.apple.com, but using their technology does not seem to work for "the rest of us"..
    any web sites other than apple that can help?

  • Page data does not load with goButton? (new window of identical page)

    Hi guys. I ran into a problem. Essentially, I need to print a .jsff page but before I do, I have to alter its format a little bit. The solution I decided to use was to create a new .jspx page containing almost the exact same content. I even copied the data bindings and everything. Finally, I created a goButton on my original page like so:
    <af:goButton text="Print as BOSSMON" destination="SubmitPrint.jspx?org.apache.myfaces.trinidad.agent.email=true"
                        targetFrame="_blank">
    </af:goButton>This opens my page nicely in the format I want. But...there is no data on the page! It just opens a frame of the page. Can someone help me resolve this?
    Otherwise, is there any other technique I could use to accomplish my goal?

    Hi guys. Thanks to everyone for their suggestions. I finally got a working solution, something totally different from the suggestions.
    My goal was to print a .jsff page nicely. But before I could do that, I needed to modify some data on the page. I also wanted to do this in as few clicks as possible. I tried the goButton technique but the binding data would not load. I couldnt figure out why.
    Nonetheless, I finally managed to make my own version (albeit, not that neat!). I accomplished this by essentially making a template which automatically opens in showprintablebehavior format. I tried to follow a bunch of online tutorials/blogs but nothing worked for me. Here are the steps I used:
    1) Creating a new .jspx page.
    2) Copy the entire source of the .jsff page (the one which needs to be printed) into our new template .jspx page. (do have to modify the beginning parts by adding <af:document> <af:form> etc)
    3) Create a pageDef for the template page and copy the entire pageDef as well (do have to change the name of the pagedef)
    4) Modify your print template to your liking.
    5) Add a taskflow rule that links the original .jsff page to the new template page
    6) Add a commandButton on the original .jsff page which opens this printing page in a new window (remember to use "dialog:....."). Here is mine:
    <af:commandButton text="Open Printer Friendly Version" id="printer_popup" action="dialog:edit_print" useWindow="true"
                                  windowEmbedStyle="window" inlineStyle="display:block;"
                                  windowHeight="100" windowWidth="100">
    </af:commandButton>7) Now, in the printing template page, add a command button which simply has the showprintablebehaviour tag within it as well as a client listener to invoke some javascript. Here is what I used:
    <af:commandButton text="Printer Page" id="sha_print">
        <af:clientListener method="do_loading" type="focus"/>
        <af:showPrintablePageBehavior/>
    </af:commandButton>8) In the beginning of this page, you will have an <af:document> tag. Modify it so it sets focus to our print button above when the page loads. Like so:
    <af:document id="d2" initialFocusId="sha_print">9) Now add a resource tag to your page which has the "do_loading" javascript method.
    <f:facet name="metaContainer">
        <af:resource type="javascript">
              function do_loading(event) {
                  var target = document.getElementById('sha_print');
                  target.click();
                  top.close();
                  //alert("got focus sir!");
        </af:resource>
    </f:facet>Thats it! What this does is when you click on the command button to open the printer template, our template page opens but as it opens, it automatically sets focus to the printer button using the document tag. The printer button has a listener which activates when it receives focus (in our case, as soon as the page loads). This listener invokes the javascript method, which progamatically clicks the printer button and closes this window. What your left with is a printer friendly page of your modified page!
    All the data is present there too!
    If anyone has any questions/comments, please do ask.

  • Brand new Mac suddenly does not load videos or plays them while buffering every 30 seconds.  Also, pages do not completely load with header, sidebar, photos, etc. loading more slowly.  What's up with this??

    My new Mac has worked beautifully until recently when it stopped loading videos from emails, websites, Amazon, etc.  Those that do load are constantly buffering and are impossible to watch.  Since I did not alter any settings or download any programs, can anyone determine what may be causing this sudden malfunction?  I have Comcast high speed Internet.  Thank you for any help you can provide.

    I have the same problem and it has just started in the last day or so...
    Got the phone late July and then in the last day, everytime I plug into PC or take a photo,  I get the same "Disk Error / Retry message"
    What is interesting is that I always had the Photo Storage location as the Memory Card (detachable).   Seems odd that sometime in the last month or so the phone decided to change my setting to the Mass Memory. Might have been an firmware update that I have done in the past but not sure.
    Changing the Photo Storage Location back to the Memory Card has stopped the error coming up everytime a Photo wastaken, but the message continues when I plug in the phone to the PC.
    Phone was just updated to latest firmware this morning and that has not helped, although during the back-up process I could not save some files from the Mass Memory.
    I wonder if Optus will shout a new phone because their technicians are useless with past experiences and to be honest the N97 really promises so much but offers very little compared to all of my last Nokia's.

  • Cant Use Page Controls to Cycle Through Records in Report with Table

    Hi
    I have built a tabular report in answers that returns a 1000 rows. I have set the number of rows to be displayed to 100. However, when I run the report i cant use the page controls to cycle to the next 100 records.
    When I edit the table with the compound layout view I can cycle through the records fine, but when I save it and run normally I cant use the page controls.
    Page controls works on other reports in the subject area but these are pivot tables not normal tables.
    Can someone help diagnose the issue?
    I'm using OBIEE 10g btw
    Thanks
    James

    Hi,
    If you have set DefaultRowsDisplayed as 100 in instaceconfig.xml file, then this would effect only the table view, not Pivot table. By default, Pivot would display all the records without pagination.
    Thanks

  • Delete blank page with javascript

    Hi,
    I have some pages in a Indesign CS3 document and want to delete few pages which are blank page(nothing text frame, graphic) with javascript. Anyone can help?
    Thanks,
    MatthewChau

    var doc=app.documents[0];
    var pag=doc.pages;
    for(var i=pag.length-1; i>=0; i--){
        if(pag[i].pageItems.length==0&&pag[i].guides.length==0){
            pag[i].remove();
    if page items and guides are not exist, pages will be deleted.
    more difficult matter?

  • How to always show page controls-Acrobat Reader DC

    Whenever I go into full screen then exit full screen, the page controls are hidden and I have to go to "View-Show/Hide-Page Controls-Show Page Controls" every single time. How can I make Acrobat Reader DC always show page controls? I keep the page controls undocked.

    Hi Awesome1pc2,
    As of now, their is no customizable setting to always show the page controls option once you exit the full-screen mode, you would have to keep working with 'Undock' option.
    Regards,
    Rahul

  • Pages not loading completely with JavaScript enabled

    This just started in the last day or so. I have Safari extensions disabled.
    When I go to the ThinkProgress.org site/blog, I'm getting an incomplete page unless I disable JavaScript. With JavaScript, I'll get the first post on the blog, but nothing else. With JavaScript off I get the site looking pretty much normal.
    I get a similar problem if I go to Economist.com and click to read one of the stories. In that case, I get the story's headline, but it cuts off before the text of the article, right after a link to Tweet the story. Again, disabling JavaScript allows the page to load correctly.
    I suspect some third-party service is providing a script, which broke in the last day or so, but nobody's paying attention because of the Holidays.
    The problem doesn't appear to effect Chrome. Safari was upgraded to 5.0.3 in November, but this problem is more recent than that.
    Has anyone else seen this?

    Hi Jonathan,
    Go to the Economist.com site.
    From your Safari menu bar click Safari / Preferences then select the Advanced tab. Select the box next to: Show Develop menu in menu bar.
    Now click Develop / Disable Runaway JavaScript Timer.
    See if that makes a difference.
    Otherwise, check Safari / Preferences - Extensions or try disabling Safari plugins, Safari / Preferences - Security.
    And delete the cookies associated with those url's in Safari / Preferences - Security. Show Cookies
    Carolyn

  • Problem with Javascript and opening a new page

    Hi,
    I'm developping a website with Java Server Faces.
    I've a problem with JavaScript.
    I have a table, and each row of that table, has a button, to display more information about that specific row. I want to display this information in a new window. For this I want to use JavaScript.
    The new window, of course, needs some information of the other window, to show the right data.
    The first time I click the 'more-information-button', it works perfectly, but from than on, he keeps showing the same information...
    Here is my jsp-page of the first page (the one with the table):
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
        <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <f:view>
             <f:loadBundle basename="languages.MessageBundle" var="bundle"/>
            <html>
                <head>
                    <meta content="no-cache" http-equiv="Cache-Control"/>
                    <meta content="no-cache" http-equiv="Pragma"/>
                    <title>- UCV-Period -</title>
                    <link href="resources/stylesheet.css" rel="stylesheet" type="text/css"/>
                </head>
                <body style="-rave-layout: grid">
                        <h:dataTable binding="#{UcvPeriod.dataTable1}" headerClass="list-header" id="dataTable1" rowClasses="list-row-even,list-row-odd" rows="5"
                            style="left: 24px; top: 168px; position: absolute" value="#{UcvPeriod.dataTable1Model}" var="currentRow">
                            <h:column binding="#{UcvPeriod.column1}" id="column1">
                                <h:outputText binding="#{UcvPeriod.outputUcvPeriod}" id="outputUcvPeriod" value="#{currentRow['UCVPERIOD']}"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{UcvPeriod.outputText2}" id="outputText2" value="#{bundle.ucvPeriod_columnHeader_ucvPeriod}"/>
                                </f:facet>
                            </h:column>
                            <h:column binding="#{UcvPeriod.column11}" id="column11">
                                <h:commandButton action="#{UcvPeriod.btnDetails_action}" binding="#{UcvPeriod.btnDetails}" id="btnDetails" value="+" onclick="window.open('Details.jsp')"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{UcvPeriod.outputText21}" id="outputText21" value=""/>
                                </f:facet>
                            </h:column>
                        </h:dataTable>
                    </h:form>
                </body>
            </html>
        </f:view>
    </jsp:root>Here is my action, when someone clicks on the 'more-information-button':
    public String bthnDetails_action() {
       Object s = outputUcvPeriod.getValue();
       BigDecimal ucvPeriod = (BigDecimal)outputUcvPeriod.getValue();
       this.getSessionBean().setUcvPeriod(new Integer(ucvPeriod.intValue());
       return "detail_ucvperiod";
    }Here is my constructor of the Detailspage.
        public Details() {
             this.txtUcvPeriod.setValue(this.getSessionBean().getUcvPeriod());
        }Here is the navigation part for this part of my faces-config.xml .
    <navigation-rule>
       <from-view-id>/UcvPeriod.jsp</from-view-id>
       <navigation-case>
           <from-outcome>detail_ucvperiod</from-outcome>
           <to-view-id>/UcvPeriod.jsp</to-view-id>
       </navigation-case>
    </navigation-rule>Thx a lot....
    Anneke

    See the tutorial "Sharing Data Between Two Pages" at http://devservices.sun.com/premium/jscreator/standard/learning/tutorials/data_sharing_twopages.html and the FAQ "How can I pass data between pages without creating SessionBean variables in Creator?" at http://devservices.sun.com/premium/jscreator/standard/reference/faqs/technical/javasource/passing_data.html. Since you can open a new window when your button is clicked, the tutorial and FAQ will explain ways to pass your data to the new window.

  • Pages load with a "hiccup"...

    Hi!
    I have a problem with pages loading with a visual "hiccup". My site www.joecurtisband.com (Google will say it's going to my myspace, but it goes to the proper site) loads o.k. and everything is good EXECPT... when you go from one page to the next, as the new page loads the image and text "hiccup". Everything seems to load for a split second about an 1/8" higher than it should, then loads in place. This ONLY happens at the published site, not in iWeb. I took great pains to assure everything was consistent from page to page so it would flow nice. Any advise would be MUCH appreciated.
    Thanks,
    Joseph

    After the pages load in the browser, a JavaScript is executed to draw the navigation bar at the top of each page.
    That instance between loading the page and the drawing of the links takes a split second.
    It's browser dependent too. Safari shows the hiccup. Firefox 3.0 & Flock do not.

  • I keep getting an intermittent error on web pages where a blue box with a question mark appears instead of pictures.  For example Facebook and Zappos would load normally on one visit, but if I visit other websites and return I get the blue box.

    I keep getting an intermittent error on web pages where a blue box with a question mark appears instead of pictures.  For example Facebook and Zappos would load normally on one visit, but if I visit other websites and return I get the blue box instead of pictures. If I restart the problem will go away temporarly. However, normally returnes in time.

    HI,
    From the Safari Menu Bar click Safari/Preferences then select the Appearance tab. Tick the box next to: Display images when the page opens.
    If that box is already ticked, from the Safari Menu Bar, click Safari / Empty Cache. When you are done with that...
    From the Safari Menu Bar, click Safari / Reset Safari. Select the top 5 buttons and click Reset. Relaunch Safari. If you still have problems loading images, go here for trouble shooting 3rd party plugins or input managers which might be causing the problem. Safari: Add-ons may cause Safari to unexpectedly quit or have performance issues
    Web pages now include a small icon or 'favicon' which is visible in the address bar and next to bookmarks. These icons take up disk space and slow Safari down. It is possible to erase the icons from your computer and start fresh. *To delete Safari's icon cache using the Finder, open your user folder, navigate to ~/Library/Safari/ and move this file "webpageIcons.db to the Trash.*
    Make sure Safari is not running in Rosetta. Right or control click the Safari icon in your Applications folder then click Get Info. In the Get Info window click the black disclosure triangle so it faces down. Where you see Open using Rosetta... make sure that is NOT selected.
    If you still have problems, go to the Safari Menu Bar, click Safari/Preferences. Make note of all the preferences under each tab. Quit Safari. Now go to ~/Library/Preferences and move this file com.apple.safari.plist to the Desktop. Relaunch Safari. If it's a successful launch, then that .plist file needs to be moved to the Trash.
    Carolyn

  • NONE of the web pages load properly. If I hit "Ctrl + F5" it will fix THAT PAGE ONLY. I have to do this to EVERY SINGLE page I try to load. This ONLY happens with FIREFOX. Internet Explorer works fine. PLEASE HELP! Thanks.

    NONE of the web pages load properly. If I hit "Ctrl + F5" it will fix THAT PAGE ONLY. I have to do this to EVERY SINGLE page I try to load. This ONLY happens with FIREFOX. Internet Explorer works fine. PLEASE HELP! Thanks.

    To answer the post title FireFox save all downloads automatically in the download folder, which you can find in the Documents folder. If you want to choose where to save your downloads go to tools>options>check always ask me where to save files.
    Secondly, I am assuming you have IE 8 installed as this is the only version that supports this fix that is currently not in beta. Go to control panel>internet options>advanced tab and reset the settings at the bottom. This may or may not fix the problem but it is a good first step.

  • After installing Firefox6 many sites will not finish loading. I click on "stop loading this page" and then click on "reload this page" and the page loads. Also if I disable javascript the page will load.

    After installing Firefox 6 MANY web site will not finish loading. I disabled all add-ons and still have the problem. If I disable javascript, the pages will load. When the page is trying to load, if I hit "stop loading this page" and then hit "reload this page", the page will load; but sometimes I have to do this 2-3 times for the page to finish loading. No problem with these pages using IE8.

    I see that you ave changed some network.http prefs.<br />
    Doing that can cause all kinds of problems because not all servers like such changes, so you can try to reset those prefs on the about:config page.<br />
    network.http.max-connections 48<br />
    network.http.max-connections-per-server 16<br />
    network.http.max-persistent-connections-per-proxy 16<br />
    network.http.max-persistent-connections-per-server 8<br />
    network.http.pipelining true<br />
    network.http.pipelining.firstrequest true<br />
    network.http.pipelining.maxrequests 8<br />
    network.http.proxy.pipelining true<br />
    network.http.request.max-start-delay 0<br />
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

Maybe you are looking for

  • Need suggestion on a Design Decision.

    Hi All, One of customer that has a more than 100,000 employee for a leave management solution. If every employee would apply around 26 leaves yearly it means Custom List would have at least 2600,000 items . I am wondering should I propose solution si

  • How to make as selection variable

    Hi All we have one variable plant. the variable is properties are: genral properties: Type of variable : Characteristic Processing by : Authorization Reference charateristic : plant. Details: Variable represents : Multiple single values variable is :

  • Caller Display

    Hope some one can help.  Have had caller display for some time, bought a new phone and it will not work.  Reverted to old phone and caller display worked for a while and then stopped working.  We have taken both phones to friends who have caller disp

  • Digital Signature on form 16

    hi Gurus i want to implement digital signature functionality on form 16. plz tell me the whole process. we are on ECc6 sysytem. currently our user has to manually sign the whole documents and this is a very time consuming process. plz give ur valuabl

  • Delete P-P CS6 after CC installation?

    New to the Premiere-Pro and video side of things ... Lightroom's last few iterations have installed themselves and 'de-installed' my previous programs, nicely saving computer space (though I know some don't like that behavior). I just up-dated to CC