Capture something like '0 '
Hello All,
I need to validate a field value if its a number or not in javascript.
I used the isNaN function & it validates correctly for inputs like *, 'a' etc..
But it doesnt work for an input like '0 '. Please note that the 0 is followed by a single space. How to validate such entries?
Regards,
Sharat
Javascript doesn't natively provide trim functionality to the String object.
To solve this, place the following code near the top of your Javascript file to add trim() functionality
String prototype.trim = function() {
a = this.replace(/^\s+/, '');
return a.replace(/\s+$/, '');
Similar Messages
-
How difficult would it be to create something like this?
I'm looking to create a flash widget similar to what WoW has
on their main page -
http://www.worldofwarcraft.com/index.xml
It needs to have images & text that could be called from
a php or text file, so that it can be dynamically changed. Movies
will also be integrated in the rotation as well for the Flash.
How difficult would this be for someone who's new to flash?
How long would it take and what all is needed to learn how to
re-create something like this?The difficulty and time to do it depends on the learning
capability of the new programmer. Patience and a drive to learn is
what all is needed. Accomplishing one step at a time is probably
the best approach, whether you're new or well-versed. -
I was looking at youtube.com, which always tells me my browser is not supported and recommends I download Firefox, but that is what I was using, so I went to Firefox to check for updates. (I think I also had freecycle.org open.) Then this message popped up in a new page: Mozilla security found (something like "too much", forget exact word) activity on your computer so it will do a fast scan of system file. There was an OK button. The page address was: http://update17.stegner.ce.ms/index.php?Q7Lhl9ShbRxGJXpkM1VLSi4ZE8H4pTedoVPySgeppM3VpC+thEspcFG7qxHgn1pdsC2h5ygPGWI3t5hXqMzL9EQaZZ3J1e3CKXgCb0Qp. I did not click OK but copied the link and closed the window which closed the internet. I have never seen this before and would like to know if it is really Mozilla or possibly something malicious. Thank you.
Good catch. That almost certainly is an invitation to download malware.
There are a lot of infected web sites pushing "fake antivirus" software. If you have any doubts about whether your system might have become infected, you can supplement your regular security software with these two highly regarded scanners:
Malwarebytes Anti-malware : http://www.malwarebytes.org/mbam.php
SUPERAntiSpyware : http://www.superantispyware.com/ -
Exist a Jtree node.id or something like this ?
I would want to retrieve a node using a unique 'id', for example the absolute index (into the total nodes count)
Is there something like this ?
Can I add a particular property to a node ? ( for example this 'id' if it does not exist )
Another question :
If I want to implement a search code, this 'id' can be useful, or must I transverse the whole Jtree
ThanksHello.
Do the following:
1. Go to the Apple Menu at the top left of the screen
2. Select Software Update...
3. Install any updates that are found.
If the Amazon issue continues after these updates, then do this:
1. Open Safari
2. Erase any web address you have currently showing (for example www.apple.com or www.google.com)
3. Type in www.amazon.com
4. That should take you directly to amazon.com
It should look like this in your Safari:: -
I'm interesting on buying a Firefox Smart Phone, but
I would like to know if are any app to install on Firefox OS smart phone in order to work with cisco call manager 10.5.
Something like Cisco Jabber for Android o iOS.
Thanks,Hi Itech,
If Cisco Jabber has a webapp, or mobile version of their website available, you should technically be able to access it through Firefox OS.
You may also search Firefox Marketplace for an alternative solution:
* [https://marketplace.firefox.com/]
- Ralph -
My iPhone 4 no longer connects to my car or alarm clock after a recent sync to my computer. The message at I get when trying to. Connect is "this accessory is not optimized for the device" or something like that. Anyone know how to fix this?
Hello there philp_69,
If I understand correctly it sounds like your phone hasnt been recognized in iTunes on your PC since the last couple of updates. I would use the troubleshooting in the following article which will walk you through the steps one by one.
iPhone, iPad, or iPod touch not recognized in iTunes for Windows
Thank you for using Apple Support Communities.
All the very best,
Sterling -
I just updated my pages and now it won't load. This is on my iPad. The first version which has the latest version it can have 5.1 or something like that. I am trying to open a document and am worried that if I uninstall and reinstall I will lose all my documents
I just uninstalled it and am waiting for it to reinstall. I sincerely hope that I have not lost everything that I worked on so hard. Now that mobile me is gone, I have not been able to go between devices to transfer things. I was merely trying to take a document I had worked on and open it in pages, but it said my version was too old. When I updated, it wouldn't load. Now I cannot do anything. I hope that the reinstall fixes it without losing everything. Please advise!!! Yes, I am in panic mode.
-
I am doing a lot of presenting with the ipad and want an app that would bullseye or show where I am to my audience. Anyone know of something like this?
It sounds like either your hard drive or the SATA cable that connects it to the motherboard are failing. This could be heat related in your case, which is why you see it after it runs awhile. You can take it to the Genius Bar for a free evaluation. If you decide to test it yourself, I usually suggest moving the hard drive to an external enclosure. If it works there for awhile, the cable is probably the issue.
http://www.amazon.com/Sabrent-2-5-Inch-Aluminum-Enclosure-EC-TB4P/dp/B005EIGUD4/ ref=sr_1_3?ie=UTF8&qid=1397647657&sr=8-3&keywords=2.5+enclosure
http://www.ifixit.com/Device/MacBook_Pro_13%22_Unibody_Mid_2009 -
I ran a virus/trojan fix and this is what it said it could not repair something in the main library core or something like that. What do I do? The problem seems to be with safari?
I ran the utility disk and this is what it said.
Warning permission differ Applications/Safari drwxr-xrx they are -rwxr-xr system/livrary Cores has been modified and will not be repaired.
Permission apllication differ on System/livrary/Pr or could be -rw-r--r-- they are rwxr-xr-x Application/iTune be droxr-xr-x they are rwxr-xr-x
Then I hit fix permissions and it said this
Warning SUID file Systm/Library/Core has been modified will not be repaired
I also downloaded Bitdefender Virus Scanner and it found nothing. -
my ipod touch 1st gen has gone into recovery and wont restore because of a error 1 or something like that can someone help me quick this ipod is my little cousins and i dont want her mum to find out what happend
I have not seen a solution for error (1)
make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
Apple Retail Store - Genius Bar -
Problem with iOS7 : I have a message on my screen "This phone is not registred as a developper phone..." or something like that, can you help me because I download the iOS7 Beta even if I was not a developper. Thank you very much if you help me.
JaillotJb wrote:
I download the iOS7 Beta even if I was not a developper.
if you downloaded it and are not a developer, then we are not allowed to help you here. sorry. -
Does Something Like This Exist Already (for Window Managers)
I know that one can use idesk to produce launchers for desktop programs in window managers like Openbox, but what about an actual small file manager, that always sits on the desktop, confined to its own little space. Kind of like conky, if this makes sense.
I don't have a great deal of programming knowledge, just basics, but I've toyed with the idea of making a script to constantly reedit the idesk config file to do this, and while it could work, it's messy at best, and doesn't provide the same desired effect that a small desktop folder sitting on the WM desktop would.
If this does exist, I give my apologies, but I did try to search Google for it, but got junk results. Also, would something like this be feasible? (I am looking for a way to improve my programming skills over the summer, and was thinking that this could possibly be a way to do it.) Even further, would it be acceptable to use Python for it?whoops wrote:
Hi!
I don't really get what you mean... the Desktop usually is a file manager, isn't it? I'm not sure if Thunar draws the desktop, but Nautilus can even be pretty bitchy if something else (like conky) wants to have a piece. I didn't care enough about rox and its "everything's a folder"-philosophy to take a really close look at it, but there was an option to have it provide a desktop, too, if I remember right. And rox sounded/looks a lot, as it would provide the most "normal filemanager" behaviour when providing the Desktop (didn't try though - maybe I will).
http://img25.imageshack.us/img25/5576/shot0004bvb.jpg
Did my best to try to elaborate by using an example there on a screenshot of my desktop. (A sloppy edit done in the GIMP)
EDIT: What I would be looking for is something contained to that spot, so that way, if I were to right click inside of the rectangle, such as on a file, I would get options with what to open the file, or something else, even copy, cut, paste, or delete. However, if I were to right click outside of the rectangle, I would get my openbox menu. Hope this helps make more sense.
Last edited by ntowakbh (2009-06-13 21:04:43) -
my Macbook air mid 2012 suddenly turn off after a strange sound (like the sound òf a fuse has blown or something like that) and I also feel a burnt smell too while i am watching a film on the internet and did not charge the laptop at this moment. The sound was from the left of it, and now just a dark screen , even I tried charging it (still has green light at the charge tool). I bought it on 13st April 2013, not often use.
I love apple and i am so sad that a new product which i seldom use could be break so easily and outstanding. It's so late in my country now but i am too disappoint about the trouble so i am writing with hope of supporting from Apple and the community.
Please help , thank broYou will have to take it to an Apple Store for repair.
-
I buy adobe creative suite for teachers and students about one year ago but now i'm not longer a student. Can I still use this programs legally for commercial purposes or do I have to buy some upgrades or something like this? Please help
The license did not have use restrictions Licenses and terms of use | Adobe
BUT... when your one year Education account ends, I do not think you will be able to renew at the Education rate -
How to get an Unique id or something like an autoincrement ID
HI!
I am a SAP newbie! I want to create a database table with an unique id.
Does something like autoincrement exist?
Another Problem is that i don´t know which database will be used (sapdb, oracle, ....) so i can´t use oracle or sapDB spesific functions.
mfg markus
Message was edited by: Markus BuchnerHi
Nablan's proposition is the best way to provide a standard counter. However, you should be familiar to handle the procedure.
- <b>"Number Range"</b>s are objects for number assignments. To assign numbers, you need a corresponding number range object, a well maintained number range interval, and access to both of these things from within your application program (with the help of special function modules).
- Number range object maintenance is located in the development menu under other tools (transaction <b>SNRO</b>)
- There are standard capabilities that are included in number range feature
- Special functions that are used about number ranges are:
<b>NUMBER_GET_NEXT</b>: This FM is used in order to determine the next number(s) available.
<b>NUMBER_CHECK</b>: For checking external numbers to see if they lie within a number range interval that has been designated for external use.
<b>NUMBER_GET_INFO</b>: To get information about the individual number range intervals of number range objects (interval limits, current status, etc.)
You can find more information in the standard SAP course <b>"BC414 - Programming Database Updates"</b>.
*--Serdar
Maybe you are looking for
-
How can I install after effects on 32 bit operating system?
How can I install after effects on 32 bit operating system? I cant even find it in creative cloud. I want to make a intro but it dossent allow me to even find/ istall it. I hope some one will help me by anwsering my question. Than you for time.
-
HOW DO I KNOW IF THE DATABASE SERVER IS RUNNING?
Hi guys, How do i write a java code to determine if my database server(s) (eg : Oracle or mySQL or postGRESQL, msSQL etc) are (is) running. I want to know how to code in java to determine if a certain database server is running when i start the java
-
am in tanzania. Am in need of a copy of DVDdrive for a macbook pro OS. how can i get a copy, please any one to help
-
Inserting A SWF into a Captive Project
Hi All, I'm trying to insert a swf into my captivate project. It goes onto the slide with no problem but when I preview the project the swf is not animated. I'm using AS3 to code the animation so there is only one frame. I set the frame rate in Capti
-
Debatching of Compex Schema using XMLDisassembler
Hi, I am having a complex schema that I need to debatch based on the no. of blocks in the message. This is the message I am receiving: <?xml version="1.0" encoding="UTF-8" ?> <response status="1" xmlns="Namespace"> <dam-schedule calculation="Wed May