html-el and javascript access

Hi, I suppose this is a bit of a newbie question but I'm trying to fix a bug on code I've inherited. Basically the <html-el> tag defines the following and works fine
<html-el:form action="saveConsumer" styleId="consumerForm" disabled="${consumerForm.formDisabled == 'true'}">
However, there are a couple of fields on the form that call a javascript function to independently enable/disable the fields depending on which user is logged in, so I'm trying to access the value of the consumerForm.formDisabled boolean within javascript but can't seem to do so, I've tried whats below but it won't work - any help would be much appreciated!
Thanks.
Ray.
<script type="text/javascript">
     function connectionPolicyToggle() {
          var element = document.getElementById('connectionPolicy');
          if (element.value == 'ALWAYS') {
               document.getElementById('connectionThreshold').disabled='true';
               document.getElementById('connectionFrequency').disabled='true';
          } else {
               document.getElementById('connectionThreshold').disabled='document.consumerForm.formDisabled.value';
               document.getElementById('connectionFrequency').disabled='document.consumerForm.formDisabled.value';
     }

Thanks for that
Just in case anyone else needs a simple version:
var SlideNumber = 4;
if(typeof window.cp === 'undefined'){
    if(SlideNumber != '') {
document.getElementById('Captivate').cpEISetValue('m_VarHandle.cpCmndGotoSlideAndResume', SlideNumber  -1);
}else
    if(SlideNumber != '') {
            window.cpCmndGotoSlideAndResume = SlideNumber-1;
Thanks
Luke

Similar Messages

  • Hi, We have an application  built using HTMl 5 and Javascript running on IPad2, iOS5.1 Safari 5.1. When we try to download a file(.pvw file) in that application safari throws "Download failed" error. Please suggest what needs to be done.

    Hi,
    We have an application  built using HTMl 5 and Javascript running on IPad2, iOS5.1 Safari 5.1.
    When a file url is clicked instead of asking for Save or Open or Cancel options, the file gets opened on IPad by default.
    Is this default behaviour which cannot be changed or can it be configured to ask user preference?
    When we try to download a file(.pvw file -> a model file) in the above application, safari throws "Download failed" error.
    Please suggest what needs to be done.
    Regards,
    Pramod

    Safari on an iPad in general does not allow downloading of files. That's a safety precaution in the iOS SDK to keep unauthorized content off of iOS devices. Safari will open from the web site file types that it can handle, but direct downloading isn't normal behavior, and I don't believe the behavior can be changed, though you can try asking in the developer forum, either here or the one to which you have access as a member of Apple's iOS developer program.
    Regards.

  • Avoiding html codes and javascript codes in servlets

    Are there ways to avoid long html codes using out.println() and also javascript codes in servlets? Can I make a jsp and include that file somehow in the servlet and do the processing. Can I get reference to the fields or components declared in the jsp and also do conditional flow based on the buttons present in that jsp.
    Is it possible to include javascript files and instead call that javascript file and also the particular function in that file?
    Please also mention disadvantages if any.

    Javascript is for the client ONLY. Even if you could find a way to use it on the server side, DON'T.
    In my opinion, you should have ZERO logic (except for validation via JavaScript) in your JSP. Have a Servlet do all logic/business rules. The Servlet will create one or more Java Beans that hold ALL dynamic content for a page. Use the Servlets RequestDispatcher to forward the request to the JSP upon completion. The JSP should do nothing more than grab these beans (from the HttpSession object) and fill in the dynamic parts of the page.
    By doing it this way, you seperate the logic and presentation. You can add different 'flavors' (WML, XML) by simplying creating a new JSP page that looks for the same Java Beans, but has different template text.

  • Html:link and javascript

    Maybe I'm asking the wrong question, how do you execute JavaScript within a <html:link> tag in Struts. I simply want to execute a collapse / expand divs with an onclick attribute in the <html:link> tag.
    Can this be done with some other tag?
    TC

    and why didnt u try putting the onlick tag ?
    <html:link href=# onClick="myJSfunction()">Rohit</html:link>
    -Rohit

  • Filting html tags, css, and javascript with regex

    hi everyone,
    im writing a small application where a user types in a url, and the text of the webpage is displayed in a text area.
    ive got it to work, however it takes some time, and also alot of content i dont want is displayed - tags, scripts and sometimes css.
    initally i filtered out the html tags with a regular expression, but i still get alot of unwanted content.
    im not a confident java programmer, and the idea of parsing html, css and javascript is the scariest idea ever to me, so my next idea is to keep only everything between the <body> tags - everything above and below it is deleted - hopefully that should leave me only with the visible content on the site.
    ive messed around with regular expressions but i cant get it to work, can anyone help out?
    thanks alot,
    Torre

    Darryl.Burke wrote:
    I tried out the regexes I posted on the source of a forum page, which is not valid html (contains two each opening and closing body tags). With a bit of trial and error I was able to remove everything upto the first, and not the second, opening tag by using a reluctant qualifier, ^.*?, but couldn't for the life of me achieve removal of only the last closing tag, leaving the other, invalid one intact. How would you do that?Regexes always try to match the first occurrence of whatever they're looking for (the sentinel), and there's no way to change that behavior (but it would be handy if you could). What you have to do instead is make sure the rest of the regex can't match the sentinel. For that you need lookahead, and the simplest way to use it is to scan the rest of the text looking for the sentinel and, if it doesn't find one, go ahead and gobble up the remaining text: "(?is)</body>(?!.*</body).*$" However, if there are many occurrences of the sentinel, you could take a serious performance hit. Here's a much more efficient way: "(?is)</body>(?:[^<]++|<(?!/body>))*+$" After matching the sentinel, this regex gobbles up anything that's not the first character of the sentinel, or the first character as long as it isn't followed by the remaining characters of the sentinel. The advantages of this regex are that it never has to backtrack, and the lookahead is only applied when it's necessary, where the first regex applies it every time.

  • Use of HTML and Javascript within EP

    I have a newbie question:
    I have several HTMl documents with javascript embedded like e.g. various calculators we use on the current website.
    If I want to migrate these html sources to EP content, what can I best do than?
    I assume that all existing html and javascript renders as normal without too many development involved?
    Is there a good example how-To source which I can use to demonstrate this?
    many thanks for your help

    Hi,
    Well there are two options:
    <b>1) If you are interested to make the portal component and then use in Portal.
    2) If you want to use your earlier HTML document as it is inside the portal.</b>
    In case 1 you need to make the Portal objects and then make a portal project. You can use javascript in that as well.
    In case 2 you can directly make the URL iView of the HTML document and then view it from the portal. Well this is not a good way of using your javascript. Personally I suggest you to go for Portal Project.
    I hope this help you!!
    Regards
    Pravesh
    PS: Please consider reewarding points.

  • What HTML and JavaScript engine is used within Adobe AIR on the desktop?

    HTML and JavaScript within Adobe AIR are handled by the WebKit HTML/JavaScript engine.

    I've made a little headway with this. Within your initHandler just make a call to login:
    FacebookMobile.login(loginCallback, this.stage, [], webview);
    webview is a StageWebView instance with the viewPort defined. If I left it null, or didn't set the viewPort nothing happens...
    var webview:StageWebView = new StageWebView();
    webview.viewPort = new Rectangle(0,0,400,400);
    I'm now getting a login screen.

  • 8900 Curve - HTML 4.01 and JavaScript 1.5

    Hi. I am trying to run a chess Web app (www.gameknot.com) that requires HTML 4.01 and JavaScript 1.5, so far unsuccessfully when it comes to moving pieces. Does my 8900 Curve support HTML 4.01 and JavaScript 1.5? Thank you. Jeff

    Hi Jeff. I'm also trying to make JS works, in my case using a PhoneGap application so it browses local html/JS instead of www (but it's html&javascript after all). I had some troubles when it comes to move items like small images even though the other JS functions seem to work fine. It seems we need to focus on which properties/functions related to positionning are available on the BB browsers.
    Rodrigo Bravo
    http://www.wilkonit.com

  • Can I use JavaScript HTML Portlet and PDK Portlets

    Can I use JavaScript HTML Portlet and PDK Portlets?
    My Script works fine with the an HTML portlet but it always gives a an Error Message in the status bar is that normal...
    Other then that I have JavaScript in my PDK portlet page it does not work.. it is the the same javascript I use for in my HTML portlet which works in HTML portlets..

    You'll have to place your JavaScript in the header section of your Portal page. To do so, use HTML/UI templates. For more information, refer to the How to Design and Build Compelling Portal Interfaces whitepaper.
    Good luck,
    Peter

  • Can I package an app using just html and javascript and not flash ?

    Hi :
    Sorry for the question, but I'm a little confused. 
    I know I can use javascript with adobe air, I made some test and works great, but I'm not sure if my app will work in an iphone after I build the package.
    Thanks in advanced.

    No, that's not supported in this version of PFI.  From the Developer Guide: "You cannot write HTML- and JavaScript-based AIR applications for the mobile device profile."

  • How best to store 10KB file with html and javascript

    Hello,
    I am using Oracle 11g and pl/sql.
    I want to store a 10KB of text into a table. The text has many html and javascript characters.
    What type of table column should be used for text of this size and type?
    What is the best or easiest way to get the text into the table on a regular basis?
    Should I read it from a file? Or, ideally, I would like to paste the text into a textbox in the same way it is done here when submitting questions to this forum.
    Any suggestions are greatly appreciated.

    CLOB

  • Simple HTML and Javascript iView

    Hello,
    I am new to portal content development so please just point me in the right direction...
    I have a simple requirement to render some HTML and javascript in an iView for EP 6. I do not need to pull anything from a backend system etc so I think this is a pretty straight forward work.
    Any suggestions?

    Hi,
    There are two ways, you can achieve this:
    1. To create a AbstractPortalComponent and include your HTML as resource in responce.
    Check this example, where a JSP is included in responce you should put your HTML and also IResource type as IResource.STATIC_PAGE
    IResource staticResource = request.getResource(IResource.STATIC_PAGE , "html/checkres.html");
    http://help.sap.com/saphelp_nw70/helpdata/EN/49/4dae42cb9f0f31e10000000a1550b0/frameset.htm
    2. You can place your HTML and Javascripts in KM and use the KM Doc IView to show them.
    http://help.sap.com/saphelp_nw70/helpdata/EN/fc/cf14bcd42911d5994400508b6b8b11/frameset.htm
    If you want to have the flexibility to change the HTML quite often with out redeploying the par file then choose option 2.
    Regards,
    Praveen Gudapati

  • Movies with iTunes Extras show only HTML code and not title screen when double clicked.

    I only noticed this after some iTunes updates.  Any movies that have iTunes Extras donot show the "Title Screen" when double clicked.  They only show HTML script.  I can still watch the movies, and can access the extras by going to the folder they are in, but thats a pain.  I have purchased other movies with extras since encountering the problem and have the same issue.  I run windows Vista on a 32-bit system. I have all updated drivers.  I have searched the web for an answer but couldnt find anything.  It is prob something insanely easy.  Any help would be appriciated.
    Example of text that appears when double clicking:
    <!doctype html>
    <html>
    <head>
         <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
         <meta name="hdtv-fullscreen" content="true" />     
         <meta name="hdtv-cursor-off" content="true" />          
         <title>Paul (Unrated) [2011]</title>          
         <!--      TuneKit      -->   
      <script type="text/javascript" src="TuneKit/src/TuneKit.js" charset="utf-8"></script>          
         <!--      Styles      -->     
         <link rel="stylesheet" href="css/shared.css" type="text/css" media="screen" />     
         <link rel="stylesheet" href="css/home.css" type="text/css" media="screen" />     
         <link rel="stylesheet" href="css/chapters.css" type="text/css" media="screen" />     
         <link rel="stylesheet" href="css/features.css" type="text/css" media="screen" />     
         <link rel="stylesheet" href="css/more.css" type="text/css" media="screen" />          
         <!--      Controllers      -->     
         <script type="text/javascript" src="controllers/data.js" charset="utf-8"></script>     
         <script type="text/javascript" src="controllers/home.js" charset="utf-8"></script>     
         <script type="text/javascript" src="controllers/chapters.js" charset="utf-8"></script>     
         <script type="text/javascript" src="controllers/features.js" charset="utf-8"></script>     
         <script type="text/javascript" src="controllers/more.js" charset="utf-8"></script>
    </head>
    <body>
         <div id="bleed">          
              <div id="navigation">             
                   <img id="pic0" class="picBLANK" src="images/home/Paul_mm_background_01.jpg"/>            
              <img id="pic1" class="picBLANK" src="images/home/Paul_mm_background_01.jpg"/>             
                   <img id="pic2" class="picBLANK" src="images/home/Paul_mm_background_02.jpg"/>            
              <img id="pic3" class="picBLANK" src="images/home/Paul_mm_background_03.jpg" />            
              <img id="pic4" class="picBLANK" src="images/home/Paul_mm_background_04.jpg" />            
              <img id="pic5" class="picBLANK" src="images/home/Paul_mm_background_05.jpg" />            
              <img id="pic6" class="picBLANK" src="images/home/Paul_mm_background_06.jpg" />            
              <img id="pic7" class="picBLANK" src="images/home/Paul_mm_background_07.jpg" />            
              <img id="pic8" class="picBLANK" src="images/home/Paul_mm_background_08.jpg" />            
              <img id="pic9" class="picBLANK" src="images/home/Paul_mm_background_09.jpg" />            
              <img id="pic10" class="picBLANK" src="images/home/Paul_mm_background_01.jpg" />             
                   <div id="vid" class="vid_bg">               
                        </div>          
              </div>     
         </div>
    </body>
    </html>

    The fix from this other post worked for me.
    https://discussions.apple.com/message/17691332#17691332
    FIX:
    Go into "Get Info" and set the Album name to the name of the movie for both the movie and the "Extra".  This will fix it.

  • Java and javascript cookies

    Hi
    i create a cookie called "SaveState" from javascript in my JSP dynpage.
    I want to read this from java (NOT JAVASCRIPT).
    Is this possible?
    if not, is there some kind of portal memory I can use to pass values between java and javascript?
    thanks
    Anton Kruse

    Hi,
    <b>Domain</b>
    The "domain" parameter is used to set the domain the cookie is accessable to. A path can be set for your own domain only and the domain path must include at least two periods (.domain.com). It must match your server's domain name. Therefore cookies are not a security risk since only the server that sets them can use them.
    Check this to know more about cookies:
    http://www.comptechdoc.org/independent/web/cgi/javamanual/javacookie.html
    If you still have questions, I will suggest to google on cookies.
    Greetings,
    Praveen Gudapati

  • HTML 5 and CSS 3 Support In Dreamweaver CS5

    I cannot find any information on this web site about whether and how Dreamweaver CS5 supports HTML 5 and CSS 3. There are lots of other fancy high-end whiz-bang technologies highlighted in CS5, but without support for HTML 5 and CSS 3, Adobe has left a great big hole in the middle of the new Dreamweaver. If I'm going to have to code these by hand, then there's little incentive for me to upgrade from CS4. Adobe may, by this oversight, intend to extend the useful life of Flash, but if this is so it's penny wise and pound foolish. There is much to like about Flash - and much to dislike about how it works on the user side. Leaving these problems unresolved hurts Flash, and leaving HTML 5 and CSS 3 support out of Dreamweaver hurts Dreamweaver. In other words, this is a lose-lose strategy.

    Hi Scott
    Sorry for the delay in replying, but I turn my internet connection off when working, otherwise I have found I tend to do more research than work.
    Media-Queries:
    I had viewed the video on the possible implementation of media-queries when it was first released, and in most respects the implementation is as I would expect, but it would be helpful if it was, (in a future development of the use) possible to show a list of 'common' smartphone/handheld devices, (makes/models) within the dreamweaver interface that would be usable with the screen size being used, (possibly as an import from the 'device central' device list as a drop-down list). My reason for asking for this feature is primarily as a time saving feature for the css layouts via media-queries as it would then show the targeted/usable devices in a list, and possibly alleviate the requirement of developing layouts that are not really required.
    Video:
    At the moment I am using the video feature as you have indicated where possible, and am doing so with the use of IECC's for IE as a fall-back for that browser. I have tried targeting versions if Firefox and Safari that support the video element by testing for it with JavaScript, but I have found this unreliable, possibly when the standard is finalized this may be the better method.
    SVG:
    I personally have decided to go with svg in preference to canvas. I have seen a few 'wow' factor demo's produced using canvas but as they use cross-compiled java to javascript code they are in reality showing nothing that has not been done before, (If we had 4Ghz processors with multi-core in 1999 similar trial graphics in vml would have worked just as good then, showing my age here!).
    My current work-flow with svg is - Inkscape - Modify the code by hand/preview in a browser - copy/past the code into dreamweaver.
    The current in-line implementation of svg's in the IE9 preview is where I see the main future of the svg implementations, as this makes using svg's for graphic elements and basic animations much more viable/easier for the average designer/developer, and lets not forget that as it is a vector it is ideal for resizeable background images in fluid/liquid layouts.
    I should say here, that I will for the foreseeable future use flash/swf's for more complex animations, as these are still much better quality than anything that can be achieved with svg or canvas.
    I would like to see the possibility of using Fireworks for the creation of svg's, and a work flow similar to that available between fireworks and dreamweaver at the moment.
    Cache manifest and database:
    As you have rightly grouped these two together, (and I cannot really envision a situation that they would not be used so) the situation with these is for me, (when trying to create the code for use) the necessity of 'remembering' what I must include in the cache and the transfer of the data for the database.
    Both are probably better explained with a typical scenario -
    A new research/development firm has developed the technology and parts to upgrade an autos internal combustion engine to an hydrogen powered engine. However the products list is specific to the motor manufacturers engine type, and to make matters worse the sales department also wishes an off-line version of the demos and parts list to be available to its sales team and customers, (o/k, maybe this is not a typical scenario, but it does demonstrate the usage).
    When developing the 'custom' html 5' enabled page I would require the cache manifest to include all necessary javascript/images/videos that would be required for the particular auto manufacturer to be available off-line, and compiling the list must be done at present by hand making it subject to possible errors.
    As for the database, (manufacturer specific) this must also be available off-line and updateable by the sales person and customer, as they are not always on-line and no hard-copys of material will be produced, (except when printed by the mechanic).
    My solution for me regarding the cache manifest would possibly be a dialogue in dreamweaver that would show all resources associated with the auto manufacturers model type used in the html site. I have used namespaces, (or some form of identifier) for general and model specific javascript, and a model identifying code for images and videos. The dialogue would then allow me to filter the resources required using the namespaces and identifier and include them in the list as required, possibly in much the same way that items are moved from a general list to a more specific list when creating the 'favourites' toolbar in dreamweaver.
    The database is on first appearance much simpler, as I would simply download the database using the motor_id as a filter, (yes Scott, you can see where I am going with this ) for those who cannot this would be wrong. You have correctly seen the problem with doing this, but I will explain for those who have not. The sales person and the customer would not see any of the images or videos that have references stored in the database, as these are just references and not the actual images/videos, yes one could use 'BLOB' for storing the items but this is not in my experience a reliable method. What is required is some form of method that would also download these items and place them into the required file position for off-line viewing, (which is what the cache manifest would do).
    So I would also require the possibility to add dynamically to the cache manifest from an sql database at the same time as the 'save for off-line' option is generated, (I have experimented with doing this in a similar manner that xml is created from an sql database).
    That's it for the html 5.
    Accessibility:
    For checking I use the firefox accessibility extension and total validator extension first, then the WAVE evaluation tool.
    But for Dreamweaver I would like to see the inclusion of the ARIA options as standard, especially when developing 'rich-internet-applications' particularly the aria-live and role options. I often find it interesting in discussions about html 5 where it is seen by many as a 'new' mark-up' language for the web, but rarely seen in the context of helping in accessibility when used correctly. Even the html 5 spec contains a section on using the new mark-up as part of accessibility and how the ARIA roles should be applied, (see - http://www.whatwg.org/specs/web-apps/current-work/multipage/content-models.html#annotation s-for-assistive-technology-products-%28aria%29).
    The inclusion of an extra live-view option in dreamweaver that render the page in 'screen reader' mode would also be a possible accessibility checking help. This could be done by simply turning off the background-images 'on-mass' and rendering any items as they would be seen by a screen reader. As most screen readers do now parse JavaScript and css, it would illustrate the problems of using such techniques as light-boxes without using the aria-live role to tell users that the light-box in now the focus of the page.
    For anyone who has stayed with this post, my sincere thanks, and any comments on the content would be welcome.
    Paula Z

Maybe you are looking for