Passing Javascript Enabled or Disabled value in a custom tag

Hi,
In my JSP I am using a custom tag.
This custom tag is having one attribute called status(whose value will be jsenabled means true or jsdisabled means false) depending on the browser's javascript enabled or disabled
How can i find the value of javascript enabled or javascript disabled and set the value of the attribute status in my jsp.
This is the custom tag
<t:tab summary="tabs" url="/services/eservicepac/registrationprocess/process.wss" tabNames='<%=tabList%>' currentTab="<%=currentTab%>" zone="WWW_ZONE" fetchText="false" status=" "
</t:tab>
The value of this attribute status=" " should be the value of jsenabled or disabled.
Since the user can visit any page at any time, the jsenabled value is not maintained in session or request, so i can't take from session or request also.
As this is urgent,
--I am expecting the reply                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Hi Merlin,
In addition to what was written above, you must make sure that you tell your web application to run as a JSP 2.0 web application.
You do this by defining your web.xml a little differently. Like this at the top:
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd">
That should be what you need to get it working correctly.
Damian Sutton

Similar Messages

  • Passing Values back from Custom Tag

    I'm using custom tags, and I'm trying to pass back values to the JSP page from a tag which is iterating over values it gets from an Array. But for some reason I can't access the values.
    Here is the Tag:
    public class MemberHelper extends TagSupport implements IterationTag {
        private Iterator iterator;
        protected Tag parent;
        protected PageContext pageContext;
        public MemberHelper() {
            super();
        public void otherDoStartTagOperations() { 
            sfmember_prop_desc desc = new sfmember_prop_desc();
         ArrayList allt = new ArrayList();
         try {
                 allt = desc.GetAllCustom();
         } catch (java.sql.SQLException ex) {}
            if(allt.size() > 0)
             iterator = allt.iterator();

        public void otherDoEndTagOperations()  {
        public boolean shouldEvaluateRestOfPageAfterEndTag()  {
            return true;
        public int doStartTag() throws JspException, JspException {
           otherDoStartTagOperations();
           if (theBodyShouldBeEvaluated()) {
              return EVAL_BODY_INCLUDE;
           } else {
              return SKIP_BODY;
         public int doEndTag() throws JspException, JspException {
           otherDoEndTagOperations();
           if (shouldEvaluateRestOfPageAfterEndTag()) {
              return EVAL_PAGE;
           } else {
              return SKIP_PAGE;
        public int doAfterBody() throws JspException {
           if (theBodyShouldBeEvaluatedAgain()) {
              return EVAL_BODY_AGAIN;
           } else {
              return SKIP_BODY;

  • Initialization of parameter values in JSP Custom Tag Handlers

    Hi - I have a tag handler for a custom tag that has no body, but accepts
              some parameters.
              If the parameters are optional and are passed with the tag in the source jsp
              page, then all is fine.
              However, for subsequent uses of the same tag in the same page if the
              optional parameters are omitted, the previous values remain in the instance
              of the tag handler class, as the attributes for the tag handler are declared
              as instance variables (with corresponding getters and setters) as per the
              tag handler specs.
              eg:
              <abc:sometag attrib1="a" attrib2="b"/>
              if attrib1 and attrib2 are optional, then a subsequent use of this tag, eg:
              <abc:sometag/>
              attrib1 and attrib2 still have their previously assigned values of "a" and
              "b".
              Is there a method I can call to get the actual values of the attributes that
              were passed on a particular call to the tag handler, or is there a way to
              initialize the attributes before the tag handler processing method, eg
              doBeforeBody(), doAfterBody(), is called?
              Thanks,
              Kevin Hooke
              

    Yeah, just call the JSPWriter's print method instead of using the StringBuffer, or write your own subclass of StringBuffer (or StringBuilder if Java 5+) which will do this for you automatically when the size is at a certain point, and clear it out)

  • Pass structure or array into a custom tag?

    Is it possible to pass a CF structure or array to a custom
    tag (C++/MFC) as an argument? Is it possible to create a CF array
    or structure *from* a custom tag?

    Passing a structure out is as easy as using a period in the
    variable name in your SetVariable() call.
    For example,
    pRequest->SetVariable ("SPP_zResults.bHadErroredPts", "0");
    pRequest->SetVariable ("SPP_zResults.dMax",
    "3.14159265");
    Passing a struct in may be just as easy, I haven't ever
    needed to try it.
    Let us know if it works.

  • Passing javascript values to jsp without refreshing the page

    Hi,
    How do u pass a value of a javascript variable to the jsp without refreshing the page ?
    For example, a file called test.jsp in which a javascript variable x contains value 254. I need to pass the value of x to a method declared in test.jsp(same page).

    Hi Mona,
    when i say refresh i do mean a blink of the browser.
    This is a small example i wrote to show you how you can pass javascript varables to JSP variables. If you don't want the refresh to be seen by the user just include this code in a hidden frame on a page and instead of refreshing the entire page, refresh the hidden frame.
    i have to say, i didn't test the code so i don't guarantee it's flawless.
    if you need an more detailed example just tell me, i'll create one, but it won't be for today :)
    <html>
    <head>
         <title>Log in to the system</title>
    </head>
    <body>
    <script>
    //we retrieve the parameter 'user' from the URL
    <%
      String username = request.getParameter("user");
    %>
    var user = "<%= username%>";
    //check if there is a username in the URL
    if(user=="null")
      //there is no username so we log the person in as a guest
      user="guest";
      //we refresh the page and set the user parameter to 'guest'
      //the parameter now contains the javascript variable 'user'.
      //The parameter can be read by the JSP (see the top op this script).
      //This way we gave the javascript variabele to the JSP variable
      location="login.jsp?user="+user;
    else if(user=="guest")
    {  alert("Welcome "+user+", I hope you like this site"); }
    else
    {  alert("Welcome "+user+", I'm glad to see you again"); }
    </script>
    </body>
    </html>

  • Passing JavaScript value to Jsp

    Hi,
    Any idea how to pass a value from javascript to jsp page when the page gets load on browser.
    I use below code but an event is require to pass the value. Is there any code that pass automatically the value from javascript to jsp.
    <html>
    <head>
    <title>Passing Javascript value to Jsp</title>
    <script type="text/javascript" language="javascript">
    var scriptVar = "Noy"
    var WinNetwork = new ActiveXObject("WScript.Network")
    document.write (WinNetwork.username)
    document.index.hiddenTextBox.value = WinNetwork.username
    </script>
    </head>
    <%
    String jspVar = null;
    if(request.getParameter("submit") != null){
         jspVar = request.getParameter("hiddenTextBox");
         out.println("Jsp Var : " + jspVar);
    %>
    <body>
    <form name="index" onSubmit="index.jsp" method="post">
    <input type="hidden" name="hiddenTextBox"><br>
    <input type="submit" name="submit" value="Submit">
    </form>
    </body>
    </html>
    Thanks,
    ~ukbasak

    JSP/Java runs at the server side, produces a HTML page, sends it to the client side and then stops running.
    HTML, containing under each CSS and JS, arrives at the client side and runs at the client side only.
    To invoke JSP/Java using HTML you need to fire a request to the server side. That can be either a plain vanilla <a> link, a <form> to be submitted or an asynchronous Ajaxical request.
    That said, the use of ActiveX in web applications is discouraged. It's a Microsoft IE proprietaty. With other words, it isn't and won't be supported by all alternative browsers which the other half of the world is using.

  • On basis of drop down by key values i want to enable and disable ui elements is wda

    How to enable and disable ui elements on basis of drop down by key values as i show in screen shot i have 3 values in drop down by key on basis of those values i need to enable and disable ui elements in webdynpro abap kindly reply back

    Hi Sreedhara,
    There are many tutorials on SCN for learning Web Dynpro ABAP. If the following steps don't make sense to you, please do a search for some tutorials and read through the tutorial materials. Hopefully the tutorials will help you to become familiar with some of the basics of Web Dynpro ABAP.
    Here is how to enable or disable a UI element upon selection from a DropDownByKey.
    In your view context, create a context attribute of type wdy_boolean. For now, let's call this attribute IS_ENABLED
    In your view layout, bind the enabled property of the UI element to the context attribute IS_ENABLED.
    In your view actions, create an action-- let's call it SET_ENABLED-- and bind this action to the DropDownByKey element's onSelect event in the view layout.
    In the event handler method for the SET_ENABLED action, use the Code Wizard to read the value of the DropDownByKey selected value, then use the Code Wizard again to set the value of context attribute IS_ENABLED to either true or false.
    Now when a value is selected from the DropDownByKey, the SET_ENABLED action will be triggered and the IS_ENABLED context attribute will be set to either true or false. Since your UI element's enabled property is bound to this true or false value via the context binding, the UI element will change to enabled or disabled.
    Good luck!
    Cheers,
    Amy

  • About:config Javascript Enable/Disable not working correctly

    It used to be that the About:Config Javascript Enable/Disable toggle was an all or nothing swtich. If you turned it off, it was turned off for all of Firefox, including and most importantly active loaded pages with interactive content. It was an absolute need for defense against rouge pages that would do things like trap the close page function and open up many more pages when you closed a page. Other pages would attempt to download code repeatedly and the only way to truly "escape" those pages was to open up a tab with About:Config and toggle the Javascript Enabled option. This is still there, but the behavior has changed in Version 29. It no longer turns off Javascript for all pages loaded or future loaded, only future loaded ones have it turned off. This is a show stopper. Get it back to disabling for all loaded pages or we won't use Firefox anymore.

    The problem of being trapped in an onbeforeclose event handler was tackled directly. You should not encounter that problem any more as of a few versions ago. (And/or you could use my Escape bookmarklet: [http://dev.jeffersonscher.com/bookmarklets.html#escape])
    I'm not familiar with the other issue of sites trying to download code repeatedly.
    To give feature suggestions, you can use this site: https://input.mozilla.org/feedback
    To file a more detailed request for enhancement you can use Bugzilla: https://bugzilla.mozilla.org/

  • How to pass  JavaScript variable value throuh netui form ??

    Hi All,
    I have reqmnt,where in I need to pass the value from JavaScript function through
    Form submission.
    I could able to pass this through simple HTML form using SIMPLE HTML tags. How
    can i do the same thing using NETUI tag (NETUI form)??
    Can somebody throw some input on this??
    TIA,
    RAM.

    Excellent - Thats what I was also looking.
    RAM.
    Thomas Cook <[email protected]> wrote:
    >
    Here's an example of what I think you're trying to do:
    <netui:html>
    <body>
    <netui:form action="submitIt" tagId="myForm">
    <netui:button value="Submit It" onClick="return setFormValue()"/>
    <script>
    function setFormValue()
    var form = document.getElementById( getNetuiTagName( "myForm",
    this ) );
    var newVal = document.createElement( "input" );
    newVal.type = "hidden";
    newVal.name = "foo";
    newVal.value = "bar";
    form.appendChild( newVal );
    return true;
    </script>
    </netui:form>
    </body>
    </netui:html>
    Thomas
    RAMt wrote:
    Hi All,
    I have reqmnt,where in I need to pass the value from JavaScript functionthrough
    Form submission.
    I could able to pass this through simple HTML form using SIMPLE HTMLtags. How
    can i do the same thing using NETUI tag (NETUI form)??
    Can somebody throw some input on this??
    TIA,
    RAM.
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
    <title></title>
    </head>
    <body>
    Here's an example of what I think you're trying to do:<br>
    <br>
    <tt><nobr><netui:html></nobr><br>
    <nobr>  <body></nobr><br>
    <nobr>    <netui:form action="submitIt" tagId="myForm"></nobr><br>
    <nobr>    <netui:button value="Submit It" onClick="return
    setFormValue()"/></nobr><br>
    <nobr>    <script></nobr><br>
    <nobr>      function setFormValue()</nobr><br>
    <nobr>      {</nobr><br>
    <nobr>          var form
    = document.getElementById( getNetuiTagName(
    "myForm", this ) );</nobr><br>
    <nobr>          var newVal
    = document.createElement( "input" );</nobr><br>
    <nobr>          newVal.type
    = "hidden";</nobr><br>
    <nobr>          newVal.name
    = "foo";</nobr><br>
    <nobr>          newVal.value
    = "bar";</nobr><br>
    <nobr>          form.appendChild(
    newVal );</nobr><br>
    <nobr>          return true;</nobr><br>
    <nobr>      }</nobr><br>
    <nobr>    </script></nobr><br>
    <nobr>    </netui:form></nobr><br>
    <nobr>  </body></nobr><br>
    <nobr></netui:html></nobr></tt><br>
    <br>
    Thomas<br>
    <br>
    RAMt wrote:
    <blockquote cite="[email protected]" type="cite">
    <pre wrap="">Hi All,
    I have reqmnt,where in I need to pass the value from JavaScript function
    through
    Form submission.
    I could able to pass this through simple HTML form using SIMPLE HTML
    tags. How
    can i do the same thing using NETUI tag (NETUI form)??
    Can somebody throw some input on this??
    TIA,
    RAM.
    </pre>
    </blockquote>
    </body>
    </html>

  • Passing JavaScript values to JSP variables

    Can any body correct the follwing code
    <Script language="JavaScript">
    function test( x )
    <%
    int num = x;
    num = num * 2;
    %>
    v.value = "<%out.print(num);%>";
    <input type="button" name="b" value="test" onClick="test(5)">
    <input type="text" name="v" value="0">
    In short, I am trying to pass JavaScript value to JSP variable. I hope that it is possible to do that. If it is possible then how can I do it. I want to assing the variable x passed to the JavaScript function called test to the JSP variable called num.
    Regards,
    Ageel

    Thank you for your reply,,,
    I think then the only way to do it is to post the
    value on the server and then use request.getParameter
    method in jsp code
    but the question now how can I post values to the
    server using JavaScript without reloading the pageyes... you can to it by create a new popup window which will submit the value to server after page was loaded... then, server return a value to the same window in html/jsp page which then using javascript to set it back to the opener and close up the window... however, this is not a good choice unless you have no other alternative...
    >
    There is other possible solution
    if I can get the text field value from the same page
    without reloading it that would work fine and will
    solve my problem, is it possible?yes... you can get the value from the textfield...
    for example :
    function showValueInTextField()
        alert(document.forms[0].elements["mytextfieldname"].value);
    >
    My final question> can jsp change things on the same
    page without reloading it. I mean can it work like
    JavaScript so that I can use it's internal functions
    instead of using java script :S
    not really know what you trying to say here...

  • Accidently installed NoScript, can't get rid of it and JavaScript has been disabled even though it says it's enabled - help!

    I accidently installed NoScript when trying to remove adverts/pop-ups. Now it's causing problems on various sites I regularly use and I can't get rid of it. It doesn't show up on Tools/Add- ons so I can disable and JavaScript has been disabled, even though it shows as 'Enabled'.
    Help would be appreciated.

    The usual method for uninstalling extensions and themes is by using the Add-ons manager for your Mozilla application, as follows.
    # Click "Tools -> Add-ons
    # Click on the Extensions or Themes button on the top.
    # Click on the extension or theme you want to uninstall.
    # Click Uninstall.
    # Restart your Mozilla application.

  • Looking for a good Javascript to let me know if the "Enable applet plug-in and Web Start Applications is enabled" is disabled or enabled within Java Preferences?

    If this code could work on Snow Leopard as well, that would be awesome. I have a code to tell if Java is enable or disabled on any web browser, but it does not detect if the Java Preferences "Enable applet plug-in and Web Start Applications is enabled" is enabled or disabled. Just looking for a specific code to tell if this option is disabled or enabled.
    Thank you

    Launch Applications/Utilities/Java Preferences.app by double-clicking.
    EDIT; But I think you are confusing this with JavaScript which has nothing to do with it.

  • Question I am getting this error and see no place to change scripting?JavaScript is disabled in your browser. Please activate JavaScript from Tools Internet Options Security Internet Custom Level Scripting Active Scripting Enabled.

    JavaScript is disabled in your browser. Please activate JavaScript from Tools>Internet Options>Security>Internet>Custom Level>Scripting>Active Scripting>Enabled.
    These are the instructions for internet explorer but i can't see anything in firebox.

    In my Firefox 5.0 I see check-box for enabling/disabling JavaScript in the "Content" tab.
    Is it checked in your Firefox and JavaScript still not working?

  • Fail to update flash,gets "JavaScript is currently disabled in your browser and is required to download Flash Player" However javascrip is available and enabled

    Firefox requests to update Flash but the download fails over and over initialization at 50%.
    also in one trial of download i recieved the message: "JavaScript is currently disabled in your browser and is required to download Flash Player". But i checked and it is enabled.
    I am stuck with Flash In FF and moving to Chrome.

    Your system details list doesn't show that the Shockwave Flash plugin is installed and enabled.
    *https://support.mozilla.org/kb/Troubleshooting+plugins
    Latest Flash player versions here:
    *http://www.adobe.com/special/products/flashplayer/fp_distribution3.html
    You can verify on the Adobe Flash Players Test Page that the Flash plugin is working and which version you have.
    * http://www.adobe.com/software/flash/about/
    If you use extensions (Firefox/Tools > Add-ons > Extensions) that can block content (e.g. Adblock Plus, NoScript, Flash Block, Ghostery) then make sure that such extensions aren't blocking content.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Pass javascript field value to  ABAP field value

    Hi all,
          how can i Pass javascript field value to  ABAP field value  and utilise that value within layout.

    since you are new here, may i suggest you to search the forum, before posting a question. This has been discussed many times here.
    to set a js variable value to a ABAP variable value, you cannot do it on the client side, your page has to go for a server rountrip so that the value can be set into a ABAP variable.
    for this we generally follow the approach of setting the js variable value to a hidden html element (input type=hidden) and submit the form, and then in oninputprcessing retrieve the value from the form field and set it to a ABAP variable.
    Regards
    Raja

Maybe you are looking for

  • Dunning letter through email

    Hi, I want to send dunning letter ( Tcode F150) through email.As per SAP note 328124, I copied OPEN_FI_PERFORM_00001040_P into z FM. Also add new entry for 00001040 event in FIBF tcode.But still when Iam running the Tcode F150, it shows print preview

  • FB60, How to exclude a G/L account from being selected ?

    This is a continuation of a previous thread that was closed by accident!! The original question hasnu2019t been answered yet. Question ======= I am in need to EXCLUDE a specific G/L account from being selected, from the drop down list, when executing

  • Suddenly can't make calls to my skype to go number...

    I have been using my android to call my skype to go numbers for a few months now. On occasions I cannot make calls but after a few trys it goes through. But I have been trying today and there has been no luck. Any solutions? I still have minutes left

  • Using AcfUpDownload in FPM Application  of WD4A?

    I have a Webdynpro ABAP  appliction running on FPM . I have a requirement to download the mulitiple pdf documents  to the client's pc/laptop location like  C:     emp  silently  . For this requirement I gone through Thomas Jung tutorial using cahce s

  • How to install SSD in Mac Pro

    I'm upgrading a Mac Pro 1,1 - My new SSD (2.5") just arrived, and documentation is minimal - not sure if I need a kit or adapter to install into one of the open drive bays. Crucial (usually no complaints with them) isn't very informative.