Problems using ' ' (less than) symbol in JavaScript

Using JSC EA 2 and I can't use the less than operator '<' in JavaScript.
When I use an expression such as
if( a < 10 )
I get an error saying
"The content of the elelments must contain well-formed character data or markup"
However, if i change that to
if( 10 > a )
I have get no error and everything works fine.
Anyone else experience this "feature"

Hi,
Use the following code clip (withing opening & closing ) wherever you want to use JavaScript in JSC.<script language="JavaScript" type="text/javascript"><![CDATA[
// Drag onto the JSP Source -- usually within the <head> tag
// Your JavaScript code goes here, for example
function postMessage(message) {
alert(message)
]]></script>
You can create a code clip on JSC palette for later use.

Similar Messages

  • (BUG): using less than operator in javascript

    I am using Jdeveloper 11.1.1.5.0, ADF BC, ADF Faces.
    I am trying to add some java script validation in my page, just want to check if the length of an input field is less than three or not.
    here is the function I used
    function filterForNumbers(evt){
    var inputField = evt.getSource();
    var oldValue  = inputField.getValue();
    var myField   = inputField.findComponent("it2");
    var len = oldValue.length;
    if (len < 3)      
       alert ("the length is <  3" );
       myField.setValue("");
    }when I use the less then operator (<) in this part
    if (len < 3)ADF frame work considers the < as an open tag and when I run the page, it shows this error message in the log
    Error(16,16):  Illegal token.
    and the page does not run.
    workaround*
    using this syntax instead
    if (3 > len)

    Thank again Sireesha,
    I tried your suggestion with and without space. What I get is that the there is no thing on the page (only blank page is shown).
    here is my page source
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1" partialTriggers="it2">
          <af:resource type="javascript">
           function filterForNumbers(evt){
           var inputField = evt.getSource();
           var oldValue = inputField.getValue();
           var myField = inputField.findComponent("it2");
           var len = oldValue.length;
           if (len &lt 3)      
             alert ("the length is <  3" );
             myField.setValue("");
          </af:resource>
          <af:messages id="m1"/>
          <af:form id="f1">
            <af:panelFormLayout id="pfl1">
              <af:inputText value="#{bindings.Id.inputValue}"
                            label="#{bindings.Id.hints.label}"
                            required="#{bindings.Id.hints.mandatory}"
                            columns="#{bindings.Id.hints.displayWidth}"
                            maximumLength="#{bindings.Id.hints.precision}"
                            shortDesc="#{bindings.Id.hints.tooltip}" id="it1">
                <f:validator binding="#{bindings.Id.validator}"/>
                <af:convertNumber groupingUsed="false"
                                  pattern="#{bindings.Id.format}"/>
              </af:inputText>
              <af:inputText value="#{bindings.Description.inputValue}"
                            label="#{bindings.Description.hints.label}"
                            columns="#{bindings.Description.hints.displayWidth}"
                            maximumLength="#{bindings.Description.hints.precision}"
                            shortDesc="#{bindings.Description.hints.tooltip}"
                            id="it2" required="true">
                <f:validator binding="#{bindings.Description.validator}"/>
                <af:clientListener method="filterForNumbers" type="valueChange"/>
              </af:inputText>
              <af:inputText value="#{bindings.Flag.inputValue}"
                            label="#{bindings.Flag.hints.label}"
                            required="#{bindings.Flag.hints.mandatory}"
                            columns="#{bindings.Flag.hints.displayWidth}"
                            maximumLength="#{bindings.Flag.hints.precision}"
                            shortDesc="#{bindings.Flag.hints.tooltip}" id="it3">
                <f:validator binding="#{bindings.Flag.validator}"/>
              </af:inputText>
              <f:facet name="footer">
                <af:panelGroupLayout layout="vertical" id="pgl2">
                  <af:panelGroupLayout layout="horizontal" id="pgl1">
                    <af:commandButton actionListener="#{bindings.First.execute}"
                                      text="First"
                                      disabled="#{!bindings.First.enabled}"
                                      partialSubmit="true" id="cb3"/>
                    <af:commandButton actionListener="#{bindings.Previous.execute}"
                                      text="Previous"
                                      disabled="#{!bindings.Previous.enabled}"
                                      partialSubmit="true" id="cb4"/>
                    <af:commandButton actionListener="#{bindings.Next.execute}"
                                      text="Next"
                                      disabled="#{!bindings.Next.enabled}"
                                      partialSubmit="true" id="cb5"/>
                    <af:commandButton actionListener="#{bindings.Last.execute}"
                                      text="Last"
                                      disabled="#{!bindings.Last.enabled}"
                                      partialSubmit="true" id="cb1"/>
                  </af:panelGroupLayout>
                  <af:commandButton text="Submit" id="cb2"/>
                </af:panelGroupLayout>
              </f:facet>
            </af:panelFormLayout>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>

  • JCA Adapter Less than Symbol in OSB 11.1.1.5

    Hey everyone,
    When trying to create a Business Service based off of a JCA Adapter created in JDeveloper for a custom query database call, I am having issues if the query has the less than symbol in it.
    When generating the service, it gives me the following error:
    WSDL and Service Resources can not be generated at this time, please try again.
    Reason: error: Unexpected character encountered (lex state 9):
    The less than symbol is properly escaped as & l t ;
    Im using 11.1.15
    Replace & with $amp; is not working...

    When generating the service, it gives me the following errorWhat do you mean by "generating the service"? Where do you see the error? OEPE? Is that compilation time, deployment time or run time?
    Database data should be escaped finely... Can you give us more details about your case?
    Cheers,
    Vlad

  • Less Than Symbol ( )

    Hi All,
      I want a  less than ( < ) symbol to be displayed .....
    When I give "&gt;" , I get a greater than symbol (>)..... But when I give "&lt;" , i get a blank value
    Thanks

    <mx:.................    dataProvider="&lt;">

  • Why did I receive an e-mail saying I have exceeded my storage when I am using less than 1 GB

    why did I receive an e-mail saying I have exceeded my storage when I am using less than 1 GB?

    Thanks: our creatives said they would research "with Apple" and let us know next week when we are there for training, so you are correct we probally don't need the Genius Bar, but since we're at the Apple store for training it's good to keep in touch with them as they always have some good tips or advice.
    Plus if they get to know you you seem to get better service

  • So With All my apps i am using less than 300mb no music no videos, but my iPad is saying that I have used 13.1gb how can I get that lost space?

    So With All my apps i am using less than 300mb no music no videos but my iPad is saying that I have used 13.1gb how can I get that lost space?

    Did you confirm this in Settings>General>Usage>Storage? You can see how much storage space each app is taking up. If that checks out with your findings, then your space is probably being taken up by "other". You can see this when you connect your iPad to your computer and with iTunes running. You can see it in the capacity bar at the bottom of the iTunes window on the right side.
    "Other" contains most of the stuff associated with apps but not the apps or any media itself. Safari history and bookmarks, contacts, notes, text messages, email messages and so on. When "other" takes up that much space, something is wrong and usually restoring the iPad will clear that up.
    Backup the iPad, transfer purchases, restore to factory settings, restore from the backup and then sync with iTunes to retrieve everything.
    iTunes: Restoring iOS software - Support - Apple

  • Form problem with less than (le)

    I have a form, when users push the next button there will be
    some input field checking before the user is realy going to the
    next page.
    Now I want to check if the zip code (Netherlands) is not less
    than 6 postions.
    In the begining I used this code:
    if (zipcode_txt.text eq "") {
    result_txt.text = "Your zipcode is empty";
    But now I want to check if there are really 6 positions in
    the input field. I have already been trying this code, but that's
    not working:
    if (zipcode_txt.text le 6) {
    result_txt.text = "Your zipcode is empty";
    Can someone help me out here

    I don't know why you want to use "eq" and "le" instead of
    "==" and "<" but you should at use:
    if (zipcode_txt.text.ength < 6) {
    result_txt.text = "Your zipcode is empty";
    }

  • AppleCare Service Problem (Recived less than 60GB ipod).

    Hello, I recently sent in my 60G ipod for service and it appears it was replaced with a new one. The problem is, I have been cheated out of about 5 gigs of memory. When I connected my ipod to my pc for the first time it read, Free: 55.68 GB. Is this normal? Should I complain about this and who should I contact? Thanks for any help,

    As an aside, this applies to all hard drives. So when you are talking about gigabytes, the real size in your computer is only 0.93 times what is stated on the box. So a "250GB" will be around 232 and a "160GB" drive is really less than 150GB. So don't feel too bad about your 5GB, if it was a "250GB" iPod you would have lost 18GB. Or as an extreme example, with 500GB drives being available now, you actually end up with 35GB less in real storage. That is more than an entire 30GB iPod of pretend storage.
    Patrick

  • Flex Mobile Charts -- Less Than Symbol in Axis labels

    Hi,
       I am creating a Mobile Project and want to display a column chart. My problem is I want to display "<" in  Axis label of charts.But somehow its not working.I have tried using "&lt;" and is working fine in Web and Desktop project.But somehow it is not working in Flex mobile project. I have attached the source code for the same please help me to resolve this issue.
    Thanks & Regards
        Vishal Lad

    No attachment option found so pasting my mobile project code.I am doing same thing in Web and destop project this is working fine.But for mobile project somehow I am getting blank label.
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView" xmlns:mx="library://ns.adobe.com/flex/mx">
    <fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <fx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    [Bindable]
    public var expenses:ArrayCollection = new ArrayCollection([
    {Month:"&lt;200", Profit:2000, Expenses:1500},
    {Month:"200-400", Profit:1000, Expenses:200},
    {Month:">400", Profit:1500, Expenses:500}
    ]]>
    </fx:Script>
    <mx:ColumnChart id="myChart" dataProvider="{expenses}" showDataTips="true">
    <mx:horizontalAxis>
    <mx:CategoryAxis
    dataProvider="{expenses}"
    categoryField="Month"
    />
    </mx:horizontalAxis>
    <mx:series>
    <mx:ColumnSeries
    xField="Month"
    yField="Profit"
    displayName="Profit"
    />
    <mx:ColumnSeries
    xField="Month"
    yField="Expenses"
    displayName="Expenses"
    />
    </mx:series>
    </mx:ColumnChart>
    </s:View>

  • Using less than or equal and greater or equal relational operators in BIP

    Hi,
    I have a query wherein I am using a relational operator '<=' and '>='. When I run my sql query in TOAD in works fine but when I put it in BIP using a Data Template, it says "Data Template XML is invalid". When I try to remove the '<' and the '>' signs the query is working but of course the output is incorrect.
    My question is, what's the syntax in BIP Data Template for operators '<=' and '>='.
    Will really appreciate anyone's help.
    Thanks :)
    Ann

    Yeah this was the first thing I tried when I began to suspect my soundcard was causing the freezing and screeching while playing MTW 2 but as you can see here, I managed to get my card on it's own IRQ but the problem persists as ever.
    [img"]http://img82.imageshack.us/img82/8908/wl6.gif[/img]
    Truly extrordinary.

  • Less than symbol,   shows as XML value &lt ; in translate table drop down

    We are upgrading from 8.19 to 8.49. We have set up a field that has translate values of <, <=, >, >=, <> and =. We use this field as a drop down on a page and they should display as shown. For some reason, when you click the drop down, any of the choices containing the < symbol are replaced with '&lt ;. The other symbols seem to display normally. Instead of < we get "&lt ;" . Instead of <=, we get "&lt ;=" .
    Expected values in XLATITEM drop down:
    <
    <=
    <>
    =
    >
    =Actual values received in drop down:
    &lt ;
    &lt ;=
    &lt ;>
    =
    >
    =In version 8.22, the symbols showed up correctly. Anyone have any ideas?
    Thanks very much!

    Yes - we tried deleting all of the values and recreating them. If we delete the < symbol, the rest show up fine, which is strange. We've cleared cache on web server, app server and pc and that didn't help either. Any other thoughts?
    I appreciate your help!

  • Problem Using more than one patchset for Kernels

    I'm using vanilla 2.6.10 sources, with the -mh4 bluetooth patch, but I also want to apply the -as patch, as Arch has now adopted it for the standard kernel. So I have the following lines in the PKGBUILD:
    ##### Apply any patches here, if you set the patch variable above uncommment the following line
    patch -Np1 -i ../patch-2.6.10-as5 || return 1
    patch -Np1 -i ../patch-2.6.10-mh4 || return 1
    and I have the patches downloaded into the build directory. When I run makepkg, I get a HUNK FAILED error at the patching stage, and makepkg aborts. If I run it with the -mh4 patch only, it works OK.
    I realise this is nothing to do with the PKGBUILD, which I am sure will produce a uniquely-named package in about 30 minutes or so. Would you have any general advice regarding the use of more than one patch?

    yeah - i have done this with a few patchsets.  it's easy if you know what you are doing.
    i'll explain what is happening just in case you don't know - all patches are created based on the original code and work by matching existing code and replacing it with new code - if you apply one patch then another the first patch may alter some of the references that the second patch is try to match - so it fails.  what you need to do is to check where it has failed.
    it will say patching core.c or something and the it will say HUNK FAILED - that means the first patchset changed the core.c code and the second patch can't find what it is looking for.
    you then need to open the first patch - find out where core.c was changed and how and then open the second patch to see what it now needs to look for and then you'll then have to make new diffs to finish the process or eidt the old diffs (which is tricky but shorter)
    it ain't easy.  if you have more than a few hunk failed don't even bother - there is no guarantee that they patches will provide a build-able kernel.
    this whole process lies at the core of creating these massive patchsets - if you can combine both patchsets and get a successful build out of it you can consider yourself a novice kernel hacker. it can be done.
    i can't help much more than that i'm afraid - i'll ask cactus to split these two posts too a new thread for you

  • How do you get to greater than, less than symbols ( , )

    Trying to find these symbols on keyboard. Anybody know if they are available?
    Ken

    If using the Samsung keyboard:  press Sym, then press 1/2
    If using the Swype keyboard:  press 123 (in lower left-hand corner), then press the shift key (looks like a 1 in a box next to a 2, it's just above the Swype key)

  • Getting error message stating lack of disc space, but have only used less than 1GB of 20GB idisc space and been publishing fine until this month

    Why can't I send and email and get an answer to a problem that is clearly personal to my idisc.  What is the point of paying for Apple Care when you can't contact them when they stop access to products that you have already paid for.  I am travelling and I cannot contact them by phone.

    Try the following:
    close iWeb.
    delete the iWeb preference file, com.apple.iWeb.plist, that resides in your Home/Library/Preferences folder.
    go to your Home/Library/Caches/com.apple.iWeb folder and delete its contents.
    launch iWeb and try again.
    If that doesn't help continue with:
    move the domain file from your Home/Library/Application Support/iWeb folder to the Desktop.
    launch iWeb, create a new test site, save the new domain file and close iWeb.
    go to the your Home/Library/Application Support/iWeb folder and delete the new domain file.
    move your original domain file from the Desktop to the iWeb folder.
    launch iWeb and try again.
    OT

  • IPhoto book: Can I use less than 20 pages? and other questions...

    Is 20 pages the minimum? I have just eleven photos. Is there a workaround for this? Also, the iPhoto preview looks fine, but I'm wondering what the file specs need to be. My original files are approx. 15 MB TIFF. Should they be jpeg? Resized? Does iPhoto (or Kodak) do this automatically? Thanks for any help.

    TW3:
    Welcome to the Apple Discussions. 20 pages is the minimum. I think it's due to the minimum number of pages that can be bound. I really doesn't matter about the tiff files as iPhoto creates a PDF file for uploading and printing. Just be sure they are RBG and not CMYK.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.

Maybe you are looking for