Basic JavaScript addition problem

I'm trying to create a customized calculator in an APEX popup page using JavaScript and I keep getting caught on JavaScripts use of the + for both addition and concatenation operators. Is there a way to fix this? I'm ONLY using basic arithmetic operations, but I can't seem to find a way to declare a variable as a NUMBER the way I can in PL/SQL.
Here's my function:
<script language="JavaScript" type="text/javascript">
  function calcBMI(formItem1, formItem2, formItem3, formItem4) {
    var bmift = document.getElementById(formItem1).value;
    var bmiin = document.getElementById(formItem2).value;
    var bmiht = bmift*12;
    var bmiht = bmiht + bmiin;
    var bmiwt = document.getElementById(formItem3).value*703;
    var bmi   = bmiwt/bmiht^2;
    document.getElementById(formItem4).value = bmi;
</script>I need to add the height in feet to the height in inches, but instead of 5'4" = 64, I'm getting 604.

So here's the final function:
<script language="JavaScript" type="text/javascript">
  function calcBMI(formItem1, formItem2, formItem3, formItem4) {
    var bmift = document.getElementById(formItem1).value;
    var bmiin = document.getElementById(formItem2).value;
    var bmiht = bmift*12 + parseInt(bmiin);
    var bmiwt = document.getElementById(formItem3).value*703;
    var bmi   = Math.round(bmiwt/(bmiht*bmiht)*100)/100;
    document.getElementById(formItem4).value = bmi;
</script>

Similar Messages

  • Javascript security problem in IE/Netscape

    I am facing with the javascript security problem in IE/Netscape. I have solved this problem partially, but there are more issues involved.
    Here's the scenario:
    There is an HTML page on client's hard disk (main.htm) containing two frames:
    frame 1 contains a page that lies that is deployed from my server, say
    src="http://127.0.0.1:8080/MyApplication.htm"
    frame 2 contains a page that lies on the client's server, say
    src="http://www.clientside.com/clientPage.htm"
    My page in frame 1 wants to access the URL of the page in frame 2 (through a button click, say ). This is done in MyApplication.htm through javascript as:
    window.parent.frame2.location.href;
    Now when the above line is executed, i get the following error:
    In IE(5.0): "permission denied"
    In Netscape(4.7): "access disallowed from scripts at http://127.0.0.1:8080/MyApplication.htm to documents at another domain."
    (which is understandable)
    I have partially solved the above problem in Netscape, by granting access permissions to MyApplication.htm (page on my server) to access the
    "http://www.clientside.com/clientPage.htm" page at client's domain.
    This is done as follows:
    1. First enable code base principals in client's Netscape by adding the following line in prefs.js file of Netscape
    "user_pref("signed.applets.codebase_principal_support", true);"
    2. Secondly i must add the following line in java script of "MyApplication.htm"
    "netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserAccess");"
    Now when the client clicks the button on my frame he'll get a netscape window asking him to grant permissions to MyApplication.htm.
    After granting permission, MyApplication.htm can retrieve the URL of clientPage.htm (even if he browses to another url)
    As you can see this problem is solved partially, but i want that the page "main.htm" (which is now on the client's hard disk),
    must be deployed at client's server (in which case not even the above technique works).........what should i do? any alternates or other solution?
    Secondly i want this to work with IE too, (which should according to their documentation, but does not and is therfore a big IE bug-as mentioned on the net)
    Any sort of help in this case would greatly appreciated.
    Thanks
    Faisal Moin Khan

    i believe you are posting in the wrong forum.
    This forum is foro XML web services.

  • Gmail (Javascript?) problems in multiple browsers

    When using Gmail in Leopard's Safari, the popups when you start typing email addresses doesn't work, making it basically impossible to send emails to people in a large Group (you try typing 350 email addresses!)
    I tried it in Firefox, and the popups work, but there is an Error #611. I did some research and it appears to be a Javascript problem.
    Does Leopard have problems with Javascript?

    Hi,
    Can you reproduce this on <a target="_blank" href="https://apex.oracle.com/">apex.oracle.com</a>?
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • Javascript menu problems in IE

    Hi
    I am using a javascript menu for a website I am trying to
    build, I have tested it on many browsers and thought it was working
    fine, it's fine on all the macintosh browsers, works fine on
    firefox on the PC but there seems to be problems on some versions
    of IE. Especially runing XP but am not sure about vista.
    You dont seem to be able to see the menu when the page loads,
    you can see something is there and the buttons show when you hover
    over them, but they are kicked out of place.
    here is the code if it helps
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=ISO-8859-1" />
    <title>Ecoligical Planning and Research
    Ltd</title>
    <link href="epr.css" rel="stylesheet" type="text/css"
    />
    <script src="Scripts/AC_RunActiveContent.js"
    type="text/javascript"></script>
    </head>
    <body bgcolor="#cfdcce">
    <table width="800" border="0" align="center"
    bgcolor="#FFFFFF" class="greenborderoutline">
    <tr>
    <th height="29" align="left" scope="col"><div
    class="menu" id="menu">
    <script type='text/javascript'
    src='quickmenu.js'></script></div></th>
    </tr>
    <tr>
    <td height="132"><script type="text/javascript">
    AC_FL_RunContent( 'codebase','
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','nam e','eprbanner','width','800','height','168','id','eprbanner','title','banner','src','eprba nner','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','wmode' ,'transparent','movie','eprbanner'
    ); //end AC code
    </script><noscript><object
    classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
    name="eprbanner" width="800" height="168" id="eprbanner"
    title="banner">
    <param name="movie" value="eprbanner.swf" />
    <param name="quality" value="high" />
    <param name="wmode" value="transparent" />
    <embed src="eprbanner.swf" width="800" height="168"
    quality="high" pluginspage="
    http://www.macromedia.com/go/getflashplayer"
    type="application/x-shockwave-flash" wmode="transparent"
    name="eprbanner"></embed>
    </object>
    </noscript></td>
    </tr>
    <tr>
    <td height="304" valign="top"><table width="798"
    height="131" border="0">
    <tr>
    <th width="513" scope="col"><p
    class="bodycopyHomepage"><strong>Ecological Planning
    &amp; Research Ltd</strong> is
    <th width="275" scope="col"><span
    style="margin:0px"><img src="images/office.jpg" alt="Head
    Office" name="eprOffice" width="241" height="296" align="left"
    id="eprOffice" /></span></th>
    </tr>
    </table> </td>
    </tr>
    <tr>
    <td height="105"><img src="images/btBanner.gif"
    alt="btBanner" width="800" height="103" align="top"
    /></td>
    </tr>
    </table>
    <table width="800" align="center" border="0">
    <tr>
    <th scope="col"><div align="left"
    class="copyright">&copy;<strong> 2007</strong>
    Ecological Planning and Research Ltd </div></th>
    </tr>
    </table>
    <p> </p>
    </body>
    </html>
    any help here would be great as I am really stuck
    many thanks
    Jon

    Gad. Ask the authors of the menu for help. Would you REALLY
    use something
    like that on a web page?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "ronnyrocket" <[email protected]> wrote in
    message
    news:[email protected]...
    > Hi
    >
    > I am using a javascript menu for a website I am trying
    to build, I have
    > tested
    > it on many browsers and thought it was working fine,
    it's fine on all the
    > macintosh browsers, works fine on firefox on the PC but
    there seems to be
    > problems on some versions of IE. Especially runing XP
    but am not sure
    > about
    > vista.
    >
    > You dont seem to be able to see the menu when the page
    loads, you can see
    > something is there and the buttons show when you hover
    over them, but they
    > are
    > kicked out of place.
    >
    > here is the code if it helps
    >
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    > "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    > <html xmlns="
    http://www.w3.org/1999/xhtml">
    > <head>
    > <meta http-equiv="Content-Type" content="text/html;
    charset=ISO-8859-1" />
    > <title>Ecoligical Planning and Research
    Ltd</title>
    > <link href="epr.css" rel="stylesheet" type="text/css"
    />
    > <script src="Scripts/AC_RunActiveContent.js"
    > type="text/javascript"></script>
    > </head>
    >
    > <body bgcolor="#cfdcce">
    > <table width="800" border="0" align="center"
    bgcolor="#FFFFFF"
    > class="greenborderoutline">
    > <tr>
    > <th height="29" align="left" scope="col"><div
    class="menu" id="menu">
    > <script type='text/javascript'
    src='quickmenu.js'></script></div></th>
    > </tr>
    > <tr>
    > <td height="132"><script
    type="text/javascript">
    > AC_FL_RunContent(
    > 'codebase','
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#
    >
    version=7,0,19,0','name','eprbanner','width','800','height','168','id','eprbanne
    >
    r','title','banner','src','eprbanner','quality','high','pluginspage','
    http://www
    >
    .macromedia.com/go/getflashplayer','wmode','transparent','movie','eprbanner'
    > );
    > //end AC code
    > </script><noscript><object
    > classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    > codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve
    > rsion=7,0,19,0" name="eprbanner" width="800"
    height="168" id="eprbanner"
    > title="banner">
    > <param name="movie" value="eprbanner.swf" />
    > <param name="quality" value="high" />
    > <param name="wmode" value="transparent" />
    > <embed src="eprbanner.swf" width="800" height="168"
    quality="high"
    > pluginspage="
    http://www.macromedia.com/go/getflashplayer"
    > type="application/x-shockwave-flash" wmode="transparent"
    > name="eprbanner"></embed>
    > </object>
    > </noscript></td>
    > </tr>
    > <tr>
    > <td height="304" valign="top"><table
    width="798" height="131"
    > border="0">
    > <tr>
    > <th width="513" scope="col"><p
    > class="bodycopyHomepage">
    Ecological
    > Planning &amp; Research Ltd is
    > <th width="275" scope="col"><span
    style="margin:0px"><img
    > src="images/office.jpg" alt="Head Office"
    name="eprOffice" width="241"
    > height="296" align="left" id="eprOffice"
    /></span></th>
    > </tr>
    > </table> </td>
    > </tr>
    > <tr>
    > <td height="105"><img src="images/btBanner.gif"
    alt="btBanner"
    > width="800"
    > height="103" align="top" /></td>
    > </tr>
    > </table>
    >
    > <table width="800" align="center" border="0">
    > <tr>
    > <th scope="col"><div align="left"
    class="copyright">&copy;
    2007
    > Ecological Planning and Research Ltd
    </div></th>
    > </tr>
    > </table>
    > <p> </p>
    > </body>
    > </html>
    >
    >
    > any help here would be great as I am really stuck
    >
    > many thanks
    >
    > Jon
    >

  • JavaScript Console Problem (only in LS preview mode)

    Hello,
    my JavaScript console "crashes" in preview-mode in lifecycle designer. It just appears for a "millisecond"´, well I see it flicker at last.
    It doesn't matter if there is a syntax error or if I try to start the console by clicking a button ( Event click => console.show(); )
    The console just flickers.
    If I save the pdf file everything works fine. Console shows up on errors or if it told to do so (e.g. my button is clicked).
    I cannot afford to save the pdf-file every time for some reasons (livecycle designer is used in sap gui, I have to run the whole process to get the PDF ...)
    By the way, the same problem is present in Livecycle Designer if I use it "native", not called from within the sap.
    I have already tried to close the acrobat reader tasks. There are two of them, when adobe reader 10 starts (native or in livecycle-preview).
    But by closing one of the tasks, the second one closes, too. Therefore there is no help this way.
    I use Adobe Lifecycle Designer ES 8.0 (8.01.2008.1.380548) and Acrobat Reader X (10.0.1)
    The PDFs output in LS is set to Acrobat 8 (dynamic)
    In Acrobat Reader javascript console/debugger is set as active, as well as to show errors etc.
    It might be a problem realted to sap gui.
    I just ran the pdf-preview in sap gui. And Console didn't show up again.
    I have saved the same document from the sap print-preview on my local hd drive. Then started it with adobe reader and everything worked just fine.
    Please do not blame sap only. As I have told before: the same problem occurs if I use livecycle designer "native", not within sap gui

    nikg-fh schrieb:
    it seems the problem is caused directly by adobe reader X.
    I just have started a new descussion here (adobe reader forum).
    If anyone could help me, feel free to do so!
    my configuration:
    windows xp pro
    adobe reader x
    adobe livecycle designer 9 ( therefore it is not an version 8 issue )
    admin rights on the pc ; )
    I might add that you are not alone!
    I am having the same problem (LSD ES2 (version 9.0.0....) and Adobe Reader X and Acrobat Professional 8)
    Whenever I save a form as PDF and open it with Reader or Acrobat I get to see the console.
    But never when I view the form in Designer preview!
    That used to work until I installed Reader X.
    Same as you I checked all configurations in Reader and Acrobat: all perfect.
    I really do hope that someone finds a solution for this.
    PS. This problem should be discussed in THIS forum. It is clearly a Designer problem!

  • Javascript alert problem - select state

    I am trying to validate my form with javascript. I'm having
    trouble with my state field. If the user selects a state javascript
    alerts the following message: "SELECT ONE is not a valid choice.
    Please choose your state." I want the alert message to pop up if
    select one is selected as a state. How do I fix this problem?

    pqer wrote:
    > I am trying to validate my form with javascript. I'm
    having trouble with my
    > state field. If the user selects a state javascript
    alerts the following
    > message: "SELECT ONE is not a valid choice. Please
    choose your state." I want
    > the alert message to pop up if select one is selected as
    a state. How do I fix
    > this problem?
    >
    >
    >
    > <script language="javascript"
    type="text/javascript">
    >
    > // check to see if the form is blank
    > function validForm(contactUs) {
    >
    >
    > if(contactUs.state.value != "SELECT ONE") {
    > alert("SELECT ONE is not a valid choice. Please choose
    your state.")
    > contactUs.state.focus()
    > return false
    > }
    if(!contactUs.state.selectedIndex) {
    alert("SELECT ONE is not a valid choice. Please choose your
    state.");
    contactUs.state.focus();
    return false;
    Mick
    >
    > </script>
    >

  • Pl/sql encoding javascript parameter problem

    I am using an html form to get user input via radio buttons via the following segment
    htp.p('<input type="radio" value="a" onSelect="saySomething('fish')">');
    However, when the brackets surrounding (fish) are encountered an error occurs
    Line No. 41 : PLS-00103: Encountered the symbol "FISH" when expecting one of the following:
    . ( ) , * @ % & | = - + < / > at in mod not range rem => ..
    <an exponent (**)> <> or != or ~= >= <= <> and or like as
    between from using is null is not || is dangling
    The symbol ". was inserted before "FISH" to continue.
    (WWV-17050)
    ORA-24344: success with compilation error (WWV-11230)
    Critical Error in wwerr_api_error.get_errors! SQL Error Message: ORA-06502: PL/SQL: numeric or value error: character string buffer too small (WWV-)
    Is there a better way to program user input or how can I overcome the javascript parameter passing problem
    Many regards
    Eddie

    To include single quotes into literal strings in SQL and PL/SQL, you need to escape (double) them or replace them with concatenations with CHR(39):
    htp.p('<input type="radio" value="a" onSelect="saySomething(''fish'')">');
    or
    htp.p('<input type="radio" value="a" onSelect="saySomething('||chr(39||'fish'||chr(39||')">');

  • Basic Excise Duty problem at the time of PO genration( Dealer).

    Dear All,
    We are implmentation ECC 6.0 version.We are facing a problem in basic excise duty.I am genrating PO for dealer at that time excise duty should be in amount,this amount maintain in purchasing  condition.When we assign tax code with 0 % BED in po.BED could not copy from purchasing condition type.
    I think there was a Alternative Key (354) use in TAXINN  pricing procedure,but this could not work properly.This key was proper key or any other key use in prcing procdure.
    Any one suggest for right conclusion.
    Regards,
    Abhijit Kulkarni

    U r ? is not clear
    Hear is the process for delear case
    in Delear case u will have to maintain all the details as per raw material case
    only diffence is in the % of bed ecess and secess put 0 instade of 16 2 and 1
    at the time of po u know that u vendor will give u material at say 100 Rs increse of excise which u dont now and 4 % vat on it
    So u r po will loke like 100 basic
    bed 0
    ecess0
    scess 0
    vat 4
    total 104
    now whe u do GR
    u come to know u have 8 bed 1.6 ecess 0.8 sccess
    at the time of gr in Excise tab value
    put the excise base as 100-8-1.6-0.8 = 89.6
    and in bed 8
    ecess 1.6
    secess0.8
    and in header tab of excise in miscellaneous tab tick MRP indicator
    save ur part one and 2 posted
    then do the miro
    on item line it will show 100 as amount change it to 89.6
    click on calculate tax
    and ur excate payment of rs 104 will be done to vendor
    this the the correct process of Delear case
    Hope this is help full
    Reward if usefull

  • Validate long date in javascript & OnSubmit problem

    hi i need to validate long date format "E, dd MMM yyyy HH:mm:ss" or Thu, 18 Jul 2002 12:52:49 that is key in by the user. but i'm not sure how to do this. i have couples of input data and i'm passing an object to the javascript function validateform using OnSubmit. Which one is better, using OnSubmit or OnCick for this kind of parameter passing. Eg <form method="POST" action="insert.jsp" onSubmit="return validateForm(this)"> However i'm having a problem where when there is an invalid input from the user, it will notify the user but it will also send the form to the insert.jsp at the same time. Therefore the user can't correct the invalid data. The function return false for valid input and true for invalid. Please help!!! urgent.... thanks in advance

    Your problem is you have used
    <input type="submit" onClick="OnSubmit();">
    this won't work.
    Instead try
    <input type="button" value="someValue" onClick="OnSubmit();">
    This may help. All the best.

  • JSP Session in JavaScript variable problem

    Hi,
    I have a session variable msgSize that is being set by a Java file in the session.
    aRequest.getSession().setAttribute("msgSize", msgSize);It's value is variable depends on record count of recordset.
    In JSP page where I have to assign it's value to a javascript variable. I am doing this a s follows. I have done this in the JSP file.
    <script type="text/javascript" >
    <!--
    function getVal()
    m=${msgSize};
    -->
    </script>First Problem is I am unable to get this value inside a External JS file. It throws error but inside jsp it is working. How can i use this inside External JS?
    Second problem is once the above code executed value never refreshed to new value?
    Means first time it executed it get value 200 next time again i executed the code the real recordset is 105 but still displaying 200. But when I restart the server next time it takes value 105 by itself....
    How I tackle this problem.?
    Regards,

    problem is I am not refreshing the whole JSP page everytime, only refreshing the partial page using ajax call that's why not getting the session new value...
    any suggestions what to do to get new value?

  • Basic auth interop problem, servlet WS works, EJB WS not (Sun AS 8)

    After spending some time I managed to add HTTP basic auth to a simple web service. I have implemented two variants, an JAX-RPC servlet web service and an EJB web service.
    A (Sun) JAX-RPC client works pretty well against both web services. I do the required steps with the stub (set user/pwd) and things work. I do get the correct principal in the server side, fine.
    When I do NOT set the authentication properties at the stub, the servlet based WS responds something like HTTP error 403 (?) or so, which leads to "authentication required". The EJB based response is not that adequate, it's something like "internal server error, EJBLocalAccessException or so" but from the given message you could get the idea what's wrong.
    Anyway, I got the impression that this stuff
    return HTTP error to flag "auth required"
    is not happening for some reason in my EJB based web service. I found this problem in Sun AS 8 and I think it's the same problem when I test stuff with Oracle's OC4J ...
    Some client implementations have obviously problems to get the idea that user authentication is required. In other words, the clients cannot invoke the EJB WS. I tried it with Perl Soap::Lite, MS SOAP Toolkit 3.0 and MS .Net 1.1 stuff. All this clients work well (with authentication) when I consume the servlet based web service. But the EJB based web service is not working at all. I do get there just "not allowed" and the SOAP client runtime is not handing over any user credentials (because it's obviously not correctly asked for it by an appropriate AS response).
    Anyone else experienced this problems with EJB WS???
    Interesting question: why is the JAX-RPC client working? Is it sending the properties set at the stub in any case? Or do they "handle" the internal error coming from Sun AS explicitly or so? Strange, in a way. :-)
    Thanx for any help here!
    Merten

    I guess the reason was that I wrote
    <login-config>
    <auth-method>Basic</auth-method>
    </login-config>
    instead of required
    <login-config>
    <auth-method>BASIC</auth-method>
    </login-config>
    At deploy time, I got no error message. At usage time, I just got this AccessLocalException. That's not really nice ...
    Merten

  • Air - JavaScript DOM problems

    Dear Air-friends,
    Have a look at this short html:
    <html>
    <head>
    <script type="text/javascript"
    src="AIRAliases.js"></script>
    <script>
    var i = 0;
    var click = function() {
    var a = document.createElement("a");
    a.innerHTML = "click me " + i++;
    a.setAttribute("href", "#");
    a.setAttribute("onclick", "click()");
    document.getElementById("body").replaceChild(a,
    document.getElementsByTagName("a")[0]);
    </script>
    </head>
    <body id="body" onload="click()">
    <a />
    </body>
    </html>
    when I run this using adl something strange happens:
    - I get a "click 0", after I click a "click 1" and ....
    that's it! no continuous "click 2", etc.
    I isolated this problem to this example, but actally I need
    it for context menus in my air application.
    Can someone help? I'm out of ideas.
    Thanks,
    Harrold Korte

    Hi Joe,
    First of all, thanks for your quick reply!
    Maybe I isolated the problem a bit too much. In fact, I'm
    creating context menus using xslt.
    Each time, a new context menu is put under a node called
    <div id="wrap-menu"> containing
    a <ul> of <a>s. It is in these subsequent
    refreshing of the context-menu (produced by xslt)
    where I observed this behaviour (first time ok, second time
    nop). Should I alter each <a> in the produced context-menu
    with addEventListener afterwards?
    I have the feeling that in that case I could didge xslt as
    well. Unfortunatly, I'm a big xslt fan to create
    html output (instead of all these program lines of unpacking
    and DOM manipulation). I'm porting an
    application from JS/PHP to Air because of the file system
    access which is exactly what I was looking for.
    Thanks again,
    Harrold Korte

  • Javascript anchor problem

    I am having a problem with one of my pages. When a user goes
    to a page I wish to have a hidden div be open based on the URL that
    they come in as (they have #anchors). I tried using the
    (location.hash) but could not get it to work.
    For example if the url is www.mysite.com/bob.php#section1, I
    would like the section 1 div to be open when they arrive. The pages
    typically have dozens of anchors and hidden stuff.
    Here is the javascript I am using to show and hide the div
    sections:
    function toggleMe(a){
    var e=document.getElementById(a);
    if(!e)return true;
    if(e.style.display=="none"){
    e.style.display="block"
    } else {
    e.style.display="none"
    return true;
    and what is typically on the page:
    <a href="javascript:void(0)" onClick="return
    toggleMe('section1')">section1</a>
    <table id="section1" style="display: none;" border="0"
    cellpadding="0" cellspacing="0">
    <tbody><tr>
    <td>text text text </td>
    </tr></tbody></table>
    Any help would be greatly appreciated

    I am having a problem with one of my pages. When a user goes
    to a page I wish to have a hidden div be open based on the URL that
    they come in as (they have #anchors). I tried using the
    (location.hash) but could not get it to work.
    For example if the url is www.mysite.com/bob.php#section1, I
    would like the section 1 div to be open when they arrive. The pages
    typically have dozens of anchors and hidden stuff.
    Here is the javascript I am using to show and hide the div
    sections:
    function toggleMe(a){
    var e=document.getElementById(a);
    if(!e)return true;
    if(e.style.display=="none"){
    e.style.display="block"
    } else {
    e.style.display="none"
    return true;
    and what is typically on the page:
    <a href="javascript:void(0)" onClick="return
    toggleMe('section1')">section1</a>
    <table id="section1" style="display: none;" border="0"
    cellpadding="0" cellspacing="0">
    <tbody><tr>
    <td>text text text </td>
    </tr></tbody></table>
    Any help would be greatly appreciated

  • Javascript-actionscript problems

    I am trying to set up a test app to get a grip on communications between
    javascript and action script. I have successfully registered a call back function
    with action script to be called by javascript, But a second registered function
    is not getting recognized by javascript. <object/embed object>.callBack()
    javascript error (FireFox on Mac)
    <object/embed object>.callBack is not a function
    The page is posted at
    http://www.jekillen.com/jekillen/content/web_design/player/FLSHDev.html
    javascript sourced file
    http://www.jekillen.com/jekillen/content/web_design/player/dev.js
    buttons labeled 'TEST' and 'TEST 1'
    There is a link to the swf source code (text file). Notice the compatibility note.
    Thanks for advice, suggestions.
    JK

    I think I found the problem here;
    I have to clear the browser cache occasionally to
    get changes in code to show up.
    That became obvious when things were happening that I
    had eliminated from the swf source code, in the browser.
    The sample I posted may actually work. The browser I
    use to contact internet does not have Flash player 10
    so I have not tested the posting.
    JK

  • Privileges required to run basic javascript?

    For various reasons, I need to deploy an unsigned applet which executes some minor javascript. I've been led to believe that the applet need not be signed to do this, but when I try to load my applet, I get the exception at the end of this message.
    Commenting out the following line in code makes the exception go away. There is no indication anywhere I can find that this particular javascript call is privileged - so why am I seeing this exception?
    code:
    JSObject win = (JSObject) JSObject.getWindow(this);
    exception:
    basic: No certificate info, this is unsigned JAR file.
    java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.plugin.javascript)
    at java.security.AccessControlContext.checkPermission(Unknown Source)
    at java.security.AccessController.checkPermission(Unknown Source)
    Thanks,
    Mike Dahmus
    [email protected]

    The minimum privileges in EM for running a sql script job include:
    - Target privilege: View
    - Resource Privilege: Job system - Create
    - Access to appropriate database and host named credentials (or having the Create new Named Credential privilege)
    Regards,
    - Loc

Maybe you are looking for

  • Problem with Rescue and Recovery after installing Norton Internet Security 2010

    Hi all. It's my first time in this forum. I have a problem, with Rescue and Recovery, after installing Norton Internet Security 2010 on my T43. The message I get it: "Rescue and Recovery is unable to back up the file 'C:\Documents and settings\all Us

  • Duplicating multiple copies of DVD

    I'm on a backpacker list, and for the last few years, people have compiled a DVD of highlights of the people hiking the PCT that year. The program is public domain and copies are made without charge to the recipients. I'm duplicating some of the DVDs

  • Create user profile with custom desktop settings

    Hello everyone. I was wanting to create a new user profile called Testing and make it so that the account is only able to see 2 desktop icons. Here is the problem I'm having. I have setup the default user as well as the All user profile to have speci

  • Image editing

    Hi, I'm trying for a long time to edit a picture on the fly and return it. This picture is used in a servlet, but I don't think that is important for my problem. More exactly: I want to read an image-File (score.jpg) which is used for the Background

  • My flash/shockwave player keeps crashing/freezing

    Please help. ASUS Vivo book, firefox/mozilla (as well as chrome) latest versions of Flash/Shockwave Uninstalled/Reinstalled. Reset timer to -1. Helps a bit, but still crashes bp-f4d58f88-1730-437f-96c4-002912140704 7/4/2014 2:50 PM bp-c12e3321-f60e-4