Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Limitation of Var variable

Reply
Thread Tools

Limitation of Var variable

 
 
Pawan
Guest
Posts: n/a
 
      10-08-2007
Hi,

Can anyone please suggest me on this.

I am using var variable to get a string.Its working fine if string is
of simple type.

But giving error after entering 'Enter' or 'special charcters' in the
string.

Is it a limitation to var variable?

Can anyone suggest me on this.

Thanks,
Pawan

 
Reply With Quote
 
 
 
 
Stevo
Guest
Posts: n/a
 
      10-08-2007
Pawan wrote:
> Can anyone please suggest me on this.
> I am using var variable to get a string.Its working fine if string is
> of simple type.
> But giving error after entering 'Enter' or 'special charcters' in the
> string.
> Is it a limitation to var variable?


You're not using a var to "get" the string, you're just storing it
(after you've got it) into a variable. The important thing here is how
you're getting the variable. You could be receiving it via a JSON or XML
file, you could be capturing the keys, reading it from a form input.
There are many ways you could be "get"ting the string, and it's these
methods that are important in determining your problem. Explain how
you're getting it, and post the relevant bit of code and you'll be more
easily helped
 
Reply With Quote
 
 
 
 
Pawan
Guest
Posts: n/a
 
      10-08-2007
On Oct 8, 12:50 pm, Stevo <ple...@spam-me.com> wrote:
> Pawan wrote:
> > Can anyone please suggest me on this.
> > I am using var variable to get a string.Its working fine if string is
> > of simple type.
> > But giving error after entering 'Enter' or 'special charcters' in the
> > string.
> > Is it a limitation to var variable?

>
> You're not using a var to "get" the string, you're just storing it
> (after you've got it) into a variable. The important thing here is how
> you're getting the variable. You could be receiving it via a JSON or XML
> file, you could be capturing the keys, reading it from a form input.
> There are many ways you could be "get"ting the string, and it's these
> methods that are important in determining your problem. Explain how
> you're getting it, and post the relevant bit of code and you'll be more
> easily helped



var is getting this value from a text box.
Thanks,
Pawan

 
Reply With Quote
 
David Dorward
Guest
Posts: n/a
 
      10-08-2007
On Oct 8, 8:33 am, Pawan <maxpa...@gmail.com> wrote:
> I am using var variable to get a string.Its working fine if string
> is of simple type.


What is a 'var variable'? One declared with the var keyword to limit
its scope?

> But giving error after entering 'Enter' or 'special charcters' in
> the string.


What error? What characters are special? What code are you using?

--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/

 
Reply With Quote
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      10-08-2007
David Dorward wrote:
> On Oct 8, 8:33 am, Pawan <maxpa...@gmail.com> wrote:
>> I am using var variable to get a string.Its working fine if string
>> is of simple type.

>
> What is a 'var variable'? One declared with the var keyword to limit
> its scope?


Certainly, as there are no other variables.


PointedEars

P.S.
Your signature separator is still borken, probably because of Google Groups.
--
"Use any version of Microsoft Frontpage to create your site. (This won't
prevent people from viewing your source, but no one will want to steal it.)"
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
 
Reply With Quote
 
David Dorward
Guest
Posts: n/a
 
      10-08-2007
On Oct 8, 2:08 pm, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:
> Your signature separator is still borken,
> probably because of Google Groups.


Yes. I look forward to moving, getting my own Inet connection back up,
and having a proper NNTP server to use again.

--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/

 
Reply With Quote
 
Evertjan.
Guest
Posts: n/a
 
      10-08-2007
Thomas 'PointedEars' Lahn wrote on 08 okt 2007 in comp.lang.javascript:

> David Dorward wrote:
>> On Oct 8, 8:33 am, Pawan <maxpa...@gmail.com> wrote:
>>> I am using var variable to get a string.Its working fine if string
>>> is of simple type.

>>
>> What is a 'var variable'? One declared with the var keyword to limit
>> its scope?

>
> Certainly, as there are no other variables.



In casu strictior there are:

Function arguments are not declared with the var statement.

DOM variables are not declared with the var statement.


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between Session["var"] and Session("var") thomson ASP .Net 10 06-20-2005 01:02 PM
Difference between Session["var"] and Session("var") thomson ASP .Net 0 06-20-2005 10:54 AM
Threads.. Session var lost, App var ok Alvin Bruney ASP .Net 1 12-02-2003 01:56 AM
var.innerHTML where var is a variable!! Keiron Waites Javascript 2 08-11-2003 02:07 PM
does "struct_name var = { 0 }; " fill var with 0? Fred C++ 3 08-10-2003 09:44 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57