Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #12527 > unrolled thread

Setting a text field's value from a href

Started by"Larry.Martell@gmail.com" <larry.martell@gmail.com>
First post2012-03-09 06:18 -0800
Last post2012-03-12 16:33 -0700
Articles 8 on this page of 28 — 11 participants

Back to article view | Back to comp.lang.javascript


Contents

  Setting a text field's value from a href "Larry.Martell@gmail.com" <larry.martell@gmail.com> - 2012-03-09 06:18 -0800
    Re: Setting a text field's value from a href SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-03-09 16:23 +0100
      Re: Setting a text field's value from a href SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-03-09 16:30 +0100
        Re: Setting a text field's value from a href "Larry.Martell@gmail.com" <larry.martell@gmail.com> - 2012-03-09 07:48 -0800
      Re: Setting a text field's value from a href "Larry.Martell@gmail.com" <larry.martell@gmail.com> - 2012-03-09 07:31 -0800
        Re: Setting a text field's value from a href SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-03-09 18:50 +0100
          Re: Setting a text field's value from a href SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-03-09 19:01 +0100
      Re: Setting a text field's value from a href Jake Jarvis <pig_in_shoes@yahoo.com> - 2012-03-09 17:59 +0100
    Re: Setting a text field's value from a href Gene Wirchenko <genew@ocis.net> - 2012-03-09 09:06 -0800
      Re: Setting a text field's value from a href "Larry.Martell@gmail.com" <larry.martell@gmail.com> - 2012-03-09 09:24 -0800
        Re: Setting a text field's value from a href Gene Wirchenko <genew@ocis.net> - 2012-03-09 12:42 -0800
          Re: Setting a text field's value from a href "Larry.Martell@gmail.com" <larry.martell@gmail.com> - 2012-03-09 13:12 -0800
    Re: Setting a text field's value from a href Christian Winter <thepoet_nospam@arcor.de> - 2012-03-09 19:05 +0100
      Re: Setting a text field's value from a href "Larry.Martell@gmail.com" <larry.martell@gmail.com> - 2012-03-09 10:51 -0800
      Re: Setting a text field's value from a href Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-03-09 20:55 +0100
        Re: Setting a text field's value from a href "Larry.Martell@gmail.com" <larry.martell@gmail.com> - 2012-03-09 13:02 -0800
          Re: Setting a text field's value from a href Dr J R Stockton <reply1210@merlyn.demon.co.uk> - 2012-03-10 21:09 +0000
          Re: Setting a text field's value from a href David Mark <dmark.cinsoft@gmail.com> - 2012-03-12 16:32 -0700
            Re: Setting a text field's value from a href "Larry.Martell@gmail.com" <larry.martell@gmail.com> - 2012-03-13 10:07 -0700
              Re: Setting a text field's value from a href David Mark <dmark.cinsoft@gmail.com> - 2012-03-13 10:43 -0700
                Re: Setting a text field's value from a href "Mel Smith" <med_cutout_syntel@aol.com> - 2012-03-13 11:09 -0700
                  Re: Setting a text field's value from a href Gene Wirchenko <genew@ocis.net> - 2012-03-13 12:25 -0700
                  Re: Setting a text field's value from a href "Larry.Martell@gmail.com" <larry.martell@gmail.com> - 2012-03-13 15:18 -0700
                    Re: Setting a text field's value from a href Barry Margolin <barmar@alum.mit.edu> - 2012-04-25 16:53 -0400
    Re: Setting a text field's value from a href Denis McMahon <denismfmcmahon@gmail.com> - 2012-03-10 00:20 +0000
      Re: Setting a text field's value from a href Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-03-10 01:44 +0100
        Re: Setting a text field's value from a href SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-03-10 09:58 +0100
          Re: Setting a text field's value from a href David Mark <dmark.cinsoft@gmail.com> - 2012-03-12 16:33 -0700

Page 2 of 2 — ← Prev page 1 [2]


#12652

From"Mel Smith" <med_cutout_syntel@aol.com>
Date2012-03-13 11:09 -0700
Message-ID<9s9gqpFp58U1@mid.individual.net>
In reply to#12650
Larry & David said:
>
> > On Mar 9, 5:02 pm, "Larry.Mart...@gmail.com" <larry.mart...@gmail.com>
> > wrote:
> > > I have been programming
> > > for 36 years, however I've only been programming in javascript for 2
> > > days.
>
> > Then you should think about the above "dig" as you are definitely at
> > risk. And browser scripting is like nothing you've seen in those 36
> > years. ;)
>
> Yes, I am finding that to most definitely be the case.

It has unique challenges, which is something a lot of transplants
(e.g. Java programmers) miss. But it's not impossibly difficult, so
resist the urge to abdicate responsibility to people you don't know
and can't assess (reading their blogs doesn't count). ;)

David (& Larry):

    I've spent most of *my* last 36 years programming in a C-based database 
languages (e.g. FoxBase, FoxPro, Clipper, and xHarbour) -- preceded by 
Fortran IV, and Basic.  I still spend half my day in Javascript and Harbour) 
.

    I still keep getting tangled up in 'switching'  my mind back and forth 
during the day between Harbour and Javascript. Some little things drive me 
nuts: For example, I used the operator '<>'  (meaning not equal to) in JS, 
when I should have used '!='.  This resulted in my being baffled why my page 
wasn't working.  Of course, I started looking in the wrong place and missed 
the incorrect operator usage.  Shoulda checked it out in JSLint I guess.

    My CGI app is coded in Harbour, and I build/edit/transmit pages from the 
CGI app thru Apache to my client.  So, Im using both languages constantly 
and daily during my development.  I've even translated some of the Harbour 
functions to JS, so that I can use them in both environments (e.g., Function 
Alltrim(cSomeString)  ), etc, etc

    A weird, brain-busting life.

-Mel Smith

[toc] | [prev] | [next] | [standalone]


#12653

FromGene Wirchenko <genew@ocis.net>
Date2012-03-13 12:25 -0700
Message-ID<th7vl79kri151von5nthdhnrkob5a4fst3@4ax.com>
In reply to#12652
On Tue, 13 Mar 2012 11:09:21 -0700, "Mel Smith"
<med_cutout_syntel@aol.com> wrote:

>Larry & David said:
>>
>> > On Mar 9, 5:02 pm, "Larry.Mart...@gmail.com" <larry.mart...@gmail.com>
>> > wrote:
>> > > I have been programming
>> > > for 36 years, however I've only been programming in javascript for 2
>> > > days.
>>
>> > Then you should think about the above "dig" as you are definitely at
>> > risk. And browser scripting is like nothing you've seen in those 36
>> > years. ;)
>>
>> Yes, I am finding that to most definitely be the case.
>
>It has unique challenges, which is something a lot of transplants
>(e.g. Java programmers) miss. But it's not impossibly difficult, so
>resist the urge to abdicate responsibility to people you don't know
>and can't assess (reading their blogs doesn't count). ;)

     Watch for their biases.  You might have good reason for doing
something an unusual (to them) way.

>David (& Larry):
>
>    I've spent most of *my* last 36 years programming in a C-based database 
>languages (e.g. FoxBase, FoxPro, Clipper, and xHarbour) -- preceded by 
>Fortran IV, and Basic.  I still spend half my day in Javascript and Harbour) 

     Well, well.  I maintain an in-house application written in Visual
FoxPro.  The next version will be Webby.  Compare notes and war
stories?

>    I still keep getting tangled up in 'switching'  my mind back and forth 
>during the day between Harbour and Javascript. Some little things drive me 
>nuts: For example, I used the operator '<>'  (meaning not equal to) in JS, 
>when I should have used '!='.  This resulted in my being baffled why my page 
>wasn't working.  Of course, I started looking in the wrong place and missed 
>the incorrect operator usage.  Shoulda checked it out in JSLint I guess.

     I posted here about using VFP's && when I should have used //.

>    My CGI app is coded in Harbour, and I build/edit/transmit pages from the 
>CGI app thru Apache to my client.  So, Im using both languages constantly 
>and daily during my development.  I've even translated some of the Harbour 
>functions to JS, so that I can use them in both environments (e.g., Function 
>Alltrim(cSomeString)  ), etc, etc

     I have done a bit of that, too.

>    A weird, brain-busting life.

Sincerely,

Gene Wirchenko

[toc] | [prev] | [next] | [standalone]


#12661

From"Larry.Martell@gmail.com" <larry.martell@gmail.com>
Date2012-03-13 15:18 -0700
Message-ID<d589d0c2-7ee9-4b5b-8b60-e29ae82f748d@r21g2000yqa.googlegroups.com>
In reply to#12652
On Mar 13, 12:09 pm, "Mel Smith" <med_cutout_syn...@aol.com> wrote:
> Larry & David said:
>
>
>
> > > On Mar 9, 5:02 pm, "Larry.Mart...@gmail.com" <larry.mart...@gmail.com>
> > > wrote:
> > > > I have been programming
> > > > for 36 years, however I've only been programming in javascript for 2
> > > > days.
>
> > > Then you should think about the above "dig" as you are definitely at
> > > risk. And browser scripting is like nothing you've seen in those 36
> > > years. ;)
>
> > Yes, I am finding that to most definitely be the case.
>
> It has unique challenges, which is something a lot of transplants
> (e.g. Java programmers) miss. But it's not impossibly difficult, so
> resist the urge to abdicate responsibility to people you don't know
> and can't assess (reading their blogs doesn't count). ;)
>
> David (& Larry):
>
>     I've spent most of *my* last 36 years programming in a C-based database
> languages (e.g. FoxBase, FoxPro, Clipper, and xHarbour) -- preceded by
> Fortran IV, and Basic.  I still spend half my day in Javascript and Harbour)
> .
>
>     I still keep getting tangled up in 'switching'  my mind back and forth
> during the day between Harbour and Javascript. Some little things drive me
> nuts: For example, I used the operator '<>'  (meaning not equal to) in JS,
> when I should have used '!='.  This resulted in my being baffled why my page
> wasn't working.  Of course, I started looking in the wrong place and missed
> the incorrect operator usage.  Shoulda checked it out in JSLint I guess.
>
>     My CGI app is coded in Harbour, and I build/edit/transmit pages from the
> CGI app thru Apache to my client.  So, Im using both languages constantly
> and daily during my development.  I've even translated some of the Harbour
> functions to JS, so that I can use them in both environments (e.g., Function
> Alltrim(cSomeString)  ), etc, etc
>
>     A weird, brain-busting life.
>
> -Mel Smith

I started with BASIC when I was 16 (in 1975), then moved on to
FORTRAN, then
Pascal, C, many different assembly languages, all the shells, perl,
PHP, SQL
(Sybase, MySQL, Oracle), then C++, and finally python. I've never done
java,
javascript, or jQuery. All the web pages I've done were with PHP and
straight
HTML. I recently got some work with a new client working on their
existing
django based web site that makes very heavy use of javascript, jQuery,
and Ajax.
I got the work based on my reputation and long time experience, with
the
knowledge I had never worked in those languages before. Still, I put a
lot
of pressure on myself to come up to speed very quickly and be
productive
right away. I've never had as much trouble learning something new as
I've
had with all this. But I feel that I'm cresting the hill and slowly
but
surely getting there.

And I'm very proud to say that I've been continually employed, making
an
excellent living, for over 30 years, and I've never had to work in
Windows.

[toc] | [prev] | [next] | [standalone]


#13586

FromBarry Margolin <barmar@alum.mit.edu>
Date2012-04-25 16:53 -0400
Message-ID<barmar-A7B81E.16530425042012@news.eternal-september.org>
In reply to#12661
In article 
<d589d0c2-7ee9-4b5b-8b60-e29ae82f748d@r21g2000yqa.googlegroups.com>,
 "Larry.Martell@gmail.com" <larry.martell@gmail.com> wrote:

> I started with BASIC when I was 16 (in 1975), then moved on to
> FORTRAN, then
> Pascal, C, many different assembly languages, all the shells, perl,
> PHP, SQL
> (Sybase, MySQL, Oracle), then C++, and finally python. I've never done
> java,
> javascript, or jQuery. All the web pages I've done were with PHP and
> straight
> HTML. I recently got some work with a new client working on their
> existing
> django based web site that makes very heavy use of javascript, jQuery,
> and Ajax.
> I got the work based on my reputation and long time experience, with
> the
> knowledge I had never worked in those languages before. Still, I put a
> lot
> of pressure on myself to come up to speed very quickly and be
> productive
> right away. I've never had as much trouble learning something new as
> I've
> had with all this. But I feel that I'm cresting the hill and slowly
> but
> surely getting there.

Sounds a lot like my experience (I learned BASIC at 16 in 1977), 
although it looks like you somehow missed Lisp.  I think my Lisp 
expertise has definitely been helpful in picking up object-oriented 
scripting languages.  I'm about 75% self-taught -- I learn best by 
working from examples.

I've also just recently started doing Javascript and JQuery.

> 
> And I'm very proud to say that I've been continually employed, making
> an
> excellent living, for over 30 years, and I've never had to work in
> Windows.

I've had to *use* Windows occasionally, but also avoided ever 
programming or administering it.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***

[toc] | [prev] | [next] | [standalone]


#12561

FromDenis McMahon <denismfmcmahon@gmail.com>
Date2012-03-10 00:20 +0000
Message-ID<4f5a9e46$0$2853$a8266bb1@newsreader.readnews.com>
In reply to#12527
On Fri, 09 Mar 2012 06:18:37 -0800, Larry.Martell@gmail.com wrote:

> I have a text field and a href. When the user click on the link I want
> to set the text field to a value. I'm trying to do it with jQuery, but I
> can't get it to work. I have this:
> 
> <A href="javascript: $('filterValue').val('POR');">POR</A>
> 
> How can I accomplish this?
> 
> And before 100 people tell me that is not the proper way to use a link,
> please don't. I know this, but I have a client that wants this. I told
> them it should be a button, but they want it to be a link, and they are
> paying.

<span class="simlink" onclick="do_something">text that behaves like a 
link</span>

in your css, define relevant styles for span.simlink so that it looks and 
behaves like all the other links in the document.

Rgds

Denis McMahon

[toc] | [prev] | [next] | [standalone]


#12563

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2012-03-10 01:44 +0100
Message-ID<2320572.cjzJmWOTNm@PointedEars.de>
In reply to#12561
Denis McMahon wrote:

> On Fri, 09 Mar 2012 06:18:37 -0800, Larry.Martell@gmail.com wrote:
>> I have a text field and a href. When the user click on the link I want
>> to set the text field to a value. I'm trying to do it with jQuery, but I
>> can't get it to work. I have this:
>> 
>> <A href="javascript: $('filterValue').val('POR');">POR</A>
>> 
>> How can I accomplish this?
>> 
>> And before 100 people tell me that is not the proper way to use a link,
>> please don't. I know this, but I have a client that wants this. I told
>> them it should be a button, but they want it to be a link, and they are
>> paying.
> 
> <span class="simlink" onclick="do_something">text that behaves like a
> link</span>
> 
> in your css, define relevant styles for span.simlink so that it looks and
> behaves like all the other links in the document.

Probably the worst advice in this thread so far.  But not unexpected.


PointedEars
-- 
Sometimes, what you learn is wrong. If those wrong ideas are close to the 
root of the knowledge tree you build on a particular subject, pruning the 
bad branches can sometimes cause the whole tree to collapse.
  -- Mike Duffy in cljs, <news:Xns9FB6521286DB8invalidcom@94.75.214.39>

[toc] | [prev] | [next] | [standalone]


#12569

FromSAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid>
Date2012-03-10 09:58 +0100
Message-ID<4f5b1798$0$12497$ba4acef3@reader.news.orange.fr>
In reply to#12563
Le 10/03/12 01:44, Thomas 'PointedEars' Lahn a écrit :
> Denis McMahon wrote:
>>
>> <span class="simlink" onclick="do_something">text that behaves like a
>> link</span>
>>
>> in your css, define relevant styles for span.simlink so that it looks and
>> behaves like all the other links in the document.
>
> Probably the worst advice

why ?

develop


> PointedEars


-- 
Stéphane Moriaux avec/with iMac-intel

[toc] | [prev] | [next] | [standalone]


#12618

FromDavid Mark <dmark.cinsoft@gmail.com>
Date2012-03-12 16:33 -0700
Message-ID<073fbba3-bada-4cdb-b28c-374d619d3f25@v22g2000yqm.googlegroups.com>
In reply to#12569
On Mar 10, 4:58 am, SAM <stephanemoriaux.NoAd...@wanadoo.fr.invalid>
wrote:
> Le 10/03/12 01:44, Thomas 'PointedEars' Lahn a écrit :
>
> > Denis McMahon wrote:
>
> >> <span class="simlink" onclick="do_something">text that behaves like a
> >> link</span>
>
> >> in your css, define relevant styles for span.simlink so that it looks and
> >> behaves like all the other links in the document.
>
> > Probably the worst advice
>
> why ?

Because it's insane to create a faux link with a span.

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.javascript


csiph-web