Plus (+) and minus (-)

This works;
var namn = field._name;
field.text = (namn +"_txt");
This doesn't;
var namn = field._name;
field.text = (namn -"_txt");
How to leave out "_txt" from name? I could rename my instance
but just want to know why this doesn't work.

"thejokerman05" <[email protected]> wrote in
message
news:ehgg45$ahi$[email protected]..
> This works;
> var namn = field._name;
> field.text = (namn +"_txt");
>
> This doesn't;
> var namn = field._name;
> field.text = (namn -"_txt");
>
> How to leave out "_txt" from name? I could rename my
instance but just
> want to
> know why this doesn't work.
>
namn is a String. Strings can be concatenated with a +
because it makes
sense.
But subtracting it could mean many things like removing
matches from the end
of the String, or removing all matches.
Instead there are other ways to do this, for instance...
field.text = field._name.split("_txt")[0];

Similar Messages

  • Plus and minus keys on wireless keyboard?

    hi there everyone. i've got a new aluminum wireless keyboard and i love it to bits. gorgeous bit of design and elegance. on the previous apple keyboard however there was a couple of handy keys next to the numeric pad for 'plus' and 'minus'. Does anyone know how i can find these on the wireless keyboard? these were particularly handy when hit with the 'command' key to increase or decrease the size of text in safari.

    excellent, thank you, i'd obviously not looked at my keyboard closely enough! cheers...

  • Plus and minus DVD format on new g5's..... Can I upgrade?

    I see on the new g5's that they list plus and minus format dvd burning cabability. Can I upgrade to that ability? The current drive is very picky about media. Memorex 8x won't work. Tdk 8x will. Tdk 16x won't . I find it very annoying. It looks like there is a multiformat drive already in my g5's. How can I make them burn both plus and minus? I am running 0s 10.4.6 Is there a better drive that is not so picky? Thanks

    What software are you using to burn with?
    If you're using software that allows you to select the burn speed (e.g. Toast), what speed are you burning at?
    Can you describe what happens when the burns don't work? Do you get an error message, does the burn just stop partway through, etc.?
    From my experience, the Pioneer is less finicky, but this is just from anecdotal evidence as I've only used Pioneer drives, with the exception of the burner in my PowerBook which is a Matsushita.
    I'm reluctant to suggest buying a new drive. Is there any particular reason that +R burning is necessary? If the students bought them and the drive doesn't like them, maybe they can exchange the unused discs. Or, it might be helpful to try several different brands (I know you've already tried Memorex and TDK). Maybe try some Maxell and Verbatim.
    The Pioneer drives can be found for between $40 and $50. One of the best things about the Pioneers is that they periodically release firmware updates to the drives to enable new media to be used and to improve burn reliability. I believe OSX 10.4.6 is the first to provide native support for a non-OEM DVR-110.

  • The plus and minus button on my headphones aren't working

    The plus and minus button on my i phone 5 headphones aren't working

    I think there are a lot of us having the same problem. Siri also doesn't work. The only thing I can use the earbuds for is turning the iPod off and on.....

  • Where are the plus and minus keys on a Pavilion dv6-3150us Entertainment Notebook?

    Where are the plus and minus keys on a Pavilion dv6-3150us Entertainment Notebook?  Joe
    Joe B.

    Its on the keyboard somewhere on top center close to the number keys. To be straight, its just below F12 key. 
    //Click on Kudos and Accept as Solution if my reply was helpful and answered your question//
    I am an HP employee!!

  • My plus and minus volume control doesn't work.. Is there any way of turning them on or off? Or is my phone faulty?

    My plus and minus volume control doesn't seem to work.
    Can I switch the volume on?

    Hi Timjazzhair,
    Go to Settings ==> Sounds and in 'Ringer and Alert' set 'Change with Buttons' to YES.
    Woops! Meg beat me to it!

  • The plus(+) and minus(-) keys to increment or decrement the date

    Hi All,
    I have a date field in which I would like to have the + and - keys to increment or decrement the date as in some windows programs.
    Thank you, Bill

    Hi Chad, Yes I know the Date Picker... that is what it has now.
    My users are keyboard users... hitting the plus or minus sign in the Num Pad is much quicker if the date is only 2-3 day plus or minus...
    We desire to have the Date Picker and have maybe a onkey event call. I was hoping to find someone that has used "onkey" for a specific element/field so it doesn't look at every key stroke in the document but just the one date element onkeyup etc......
    Thanks for the response.
    Bill

  • Accordian panel with plus and minus signs to indicate state of panel

    I want the text to show [+] next to the title of the panel when it is collapsed and [-] when it is expanded
    just like http://www.reddit.com/r/indesign/comments/1jewqq/custom_kerning_applied_to_a_single_charac ter/
    the comments on this page can be expanded or collapsed by clicking the plus or minus sign
    how do i do this?

    I've started filling the accordion with my content and the
    cookie works fine. But I see some things I'd like to have changed
    if possible?
    a) When I load the page all accordion panels flips open at
    the same time and they stay open until the page has loaded. It's
    probably not visible in the demo because it's only a few bytes to
    load there. After the page has loaded the cookied panel stays open
    and the rest of the panels close. Is it possible to hide the
    loading of the panels somehow? This is kinda messy right now.
    b) I'd like to use the cookie to control the panels but only
    during the current session. When a new session occurs I'd like to
    start with all panels closed a) (or use the script that states
    default panel). The standard accordion use a small script to set
    the default open panel. I tried modifying this script but it looks
    like the accordion is following the laws of the cookie and is now
    ignoring this script.
    Panel 4 set to be default (0, 1, 2, 3):
    <script type="text/javascript">
    var Accordion1 = new
    Spry.Widget.Accordion.prototype("Accordion3");
    </script>

  • Plus and minus instead of mouse pointer

    http://www.rwphotographic.com/#/recent/pbs
    On the site above, the designer has managed to replace the mouse pointer with a plus (+) or minus (-) depending on where the mouse pointer is (either the left hand side of the screen or the right).
    I'd like to know how I could achieve this via AS3, if this is a possibility.
    It will still need to work when the browser is resized however.
    Thanks if you can help.

    This code shows either plus or minus depending over which half of green rectangle mouse is:
    import flash.events.MouseEvent;
    import flash.ui.Mouse;
    var plus:Shape = makePlus();
    var minus:Shape = makeMinus();
    var sprite:Sprite = new Sprite();
    var g:Graphics = sprite.graphics;
    g.beginFill(0x008040);
    g.drawRect(0, 0, 200, 200);
    g.endFill();
    addChild(sprite);
    sprite.x = sprite.y = 50;
    var spritVerticalCenter:Number = sprite.x + sprite.width * .5;
    sprite.addEventListener(MouseEvent.MOUSE_OVER, onSpriteOver);
    sprite.addEventListener(MouseEvent.MOUSE_OUT, onSpriteOut);
    onSpriteOut();
    function onSpriteOut(e:MouseEvent = null):void
         Mouse.show();
         plus.visible = false;
         minus.visible = false;
         stage.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
    function onSpriteOver(e:MouseEvent):void
         Mouse.hide();
         addChild(plus);
         addChild(minus);
         stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
         onMouseMove();
    function onMouseMove(e:MouseEvent = null):void
         plus.x = minus.x = mouseX;
         plus.y = minus.y = mouseY;
         plus.visible = mouseX > spritVerticalCenter;
         minus.visible = mouseX < spritVerticalCenter;
    function makePlus():Shape {
         var s:Shape = new Shape();
         var g:Graphics = s.graphics;
         g.lineStyle(4, 0xff0000);
         g.moveTo( -8, 0);
         g.lineTo(8, 0);
         g.moveTo(0, -8);
         g.lineTo(0, 8);
         return s;
    function makeMinus():Shape {
         var s:Shape = new Shape();
         var g:Graphics = s.graphics;
         g.lineStyle(4, 0xff0000);
         g.moveTo( -8, 0);
         g.lineTo(8, 0);
         return s;

  • There should be a plus and minus for zoom on the maps for iphone

    when driving having to use two hands and navigate is troublesome to say the least.  I know its cleaner and simper when not crowding the screen or maybe a prgramming issue just seems like it would be easier to use with one hand when driving sometimes if i had the buttons for zooming more safer too.  Or maybe not.   Because its making you stop or you have to take your other hand off the wheel i can do it with one hand but maybe not everyone can zoom with one hand while driving.  Just a suggestion on something apple might want to put into next maps maybe or maybe you wont even need it since now theres turn by turn.  It still neccesary for using it on a bicycle or slower moving forms of tranportation where you might need it.  Just a suggestion i thought would be helpful and maybe even safer. 

    yeah but how many people do you think in actuality use it the way you are saying.  not me when i drive im always looking for a road to see if i passed it or not and thats because i had to reroute my traffic or im lost and i turn on the map and or i passed something because the map is sometimes off etc...  It could be anyting not just the need to not touch your phone. 

  • Suggestion in creation of domain ...Plus and minus

    Hi,
    can we use same domain for common characteristics field or separate domain? (ex: fields with domain value range - Yes or No
    Which will be the better approcah?
    Regards,
    Sri

    Hi,
    SriRAM77
    Domain fixed value range ,   Yes you can use the same domain  better then separate domain.
    check this link
    [http://help.sap.com/saphelp_nw04s/helpdata/en/e2/66708f730811d2959500a0c929b3c3/frameset.htm]
    Regards,
    Ansari.

  • Printhead cleaning every time I turn on Officejet Pro 8500A Plus and lasts for 20 minutes or more

    Today I installed the printer for the first time, although I had it since two years ago. Just today I took it out from the box and installed it.
    After the installation the alignment failed, but it was not such a big problem. I connected the printer to the internet for the first time and it downloaded and installed an update. After the update the printer started cleaning the printheads and never stopped. I cancelled that by opening the cover and closing it againg. After that it retried the allignment and this time was successful. After that I was able to print normally. Then I turned of the printer. After some hours I turned it on again and it started with the long printhead cleaning again until it said the yellow ink cartridge is almost empty.  It's an absurd situation as if it was a Jacques Tati movie. Any tips on how to solve it will be much appreciated, or at least I'd like to know if there is a not so aggressive way to cancel this process. I repeat, the printer is new, it had never been used, and the printheads and ink cartridges are new too and I have only printed two pages just for checking and three allignment pages, and it already says the yellow cartridge is almost empty.
    The model is HP OFFICEJET PRO 8500 PLUS and my OS is Windows 98 (64 bits).

    The ink cartridge may have dried up while sitting that long. What do the ink levels report? If empty, I would replace the cartridges
    I was an HP employee
    Reminder: Please select the "Accept as Solution" button on the post that best answers your question. Also, you may select the "Kudos" button on any helpful post to give that person a quick thanks.

  • I have a new iPhone 6 plus and all is OK. But the mail shows more than 400 'unread' messages whereas there are none in the mailbox or trash or anywhere else I have looked. I can send and receive with no problem. I'm sure I have no unread messages.

    I have a new iPhone 6 plus and all is OK. But the mail shows more than 400 'unread' messages whereas there are none in the mailbox or trash or anywhere else I have looked. I can send and receive with no problem. I'm sure I have no unread messages.

        jsavage9621,
    It pains me to hear about your experience with the Home Phone Connect.  This device usually works seamlessly and is a great alternative to a landline phone.  It sounds like we've done our fair share of work on your account here.  I'm going to go ahead and send you a Private Message so that we can access your account and review any open tickets for you.  I look forward to speaking with you.
    TrevorC_VZW
    Follow us on Twitter @VZWSupport

  • I had the iPhone 5 for a while and my Macbook Air was sending me the incoming messages from that phone, however I just upgraded to the 6 Plus and was wondering how I can get my laptop to recognize the messages from this phone now on iMessages.

    Okay so my Macbook Air has always allowed me to receive iMessages from my iPhone 5 to my computer. So basically I could use both to text.. However I just upgraded to the iPhone 6 Plus and I would like the same to happen again with my new phone, but I don't know how. How can my incoming iMessages from my new iPhone 6 plus show up on my laptop?
    -I see all the messages from my old iPhone there, but I would like to know how to set it up so that i can view the messages from my new phone.

    Hi,
    If you are signed onto the same iCloud/Apple ID for Messages, then the second number should have been registered with your Messages on the Mac at the time it was verified.
    To check this, open Messages on the Mac, click on Accounts, and see if the number is displaying and checked. If it is not, Sign out of Messages on your new device and then sign on again.
    Again, phones need to be signed onto the same Messages account that you have set up in Messages.
    Cheers,
    GB

  • I pre-ordered an iPhone 6 Plus and the delivery date now says October 14th. The point of the pre-order is to get it on release day (or shortly thereafter). Can I go to a Verizon store to pick up my new phone on release day?

    I pre-ordered an iPhone 6 Plus and the delivery date now says October 14th. The point of the pre-order is to get it on release day (or shortly thereafter). Can I go to a Verizon store to pick up my new phone on release day?

    I'm not sure that answers the question Candice.
    I'm in the same situation.  I was up trying to get on the Verizon page at 11:55, kept getting the ECPD error.  When finally got through, the Silver Iphone Plus 64 showed arrival of 9-19.  At every step of the process, it seemed that I was ordering a phone that would arrive on day1.  At no point did it say this was an estimate.  At no point did it say it might change.  In a big yellow box, it said "9-19".  Ordered it, then got confirmation email stating it should arrive at 9-19.   Seems like all should be good, right?  Order site said 9-19, I've got a confirmation email saying 9-19, done and done.
    Then I check the website, and suddenly it changed to 10-14?!?!?!?  I feel like this was a bait and switch.  I was able to pickup an iphone5 in a local store on launch day, and would not have locked myself into a preorder through Verizon if I had known this would happen!
    So, that leads back to the original questions.  Lets assume I walk into a Verizon store on 9-19, and there is an available iphone6 plus just sitting there, can I either get that phone as fulfillment of my pre-order.  Or, cancel my pre-order and buy that phone right then and there?
    JJK
    PS:  It seems there are many people you misled this way.  For every person who takes the time to post on this site, there are going to be many many more who are silently ****** off.

Maybe you are looking for

  • Classical music in new iTunes

    Hello, I like to buy classical music. But with iTunes 9.0, when I look at a titel, it is impossible for me to know the artists. As my English is catastropic, I'll give you an example: I just looked at "Requiem" by Verdi with Antonio Pappano as conduc

  • Losing an iTunes Library...

    My parents can't remember their Apple ID or the e-mail address attached to it, so I want to just create new account for them on the same iMac where their iTunes Library is currently. Will they lose all their songs when starting anew? I know that they

  • Randomly play single item from array?

    Super rookie here to Flash. Is there some basic AS3 code to have, when the swf loads, a single video play from a collection of videos in an array? And can said code also apply to sound without video? I just found out the tutorial I was using to rando

  • D-bus restart after starting x server when using e4rat

    I am having small problem, I recently installed e4rat, give me an amazing speed up in boot, but now I have a big problem, the dbus service restart when starting x, in systemd log I can find: ch login[516]: LOGIN ON tty1 BY dragonn Sep 26 22:36:24 arc

  • HT1277 mail 4.6 will not open

    I just updated my OS X software to 10.6.8 and now I get a message that "mail.app" will not open.  The update installed a newer version of applemail so I now have two versons of mail.app on my hard drive.  When I try to open the old version (the one t