[thelist] basic xmlhttprequest

Marc Cantwell marc.cantwell at chinookmaterials.com
Thu Jan 15 20:29:32 CST 2009


I have a form and I would like to have a combobox that allows the user  
to choose values from a drop-down list or type it in the text box with  
keyboard navigation (using arrow keys) that references my contacts  
from my 37signals highrise account.  The highrise api is here http://developer.37signals.com/highrise/ 
  .  I know this is basic AJAX stuff, but I am not sure where to  
start.  I am hoping there is a template out there where all i have to  
do is enter a url to fetch the data along with the appropriate place  
to put in the authentication.  Any suggestions?

Thanks,
Marc

Marc Cantwell

Chinook Materials Inc
9125 SW Ridder Road, Suite B
Wilsonville, Oregon 97070-9626

Direct: 971.252.4735
Fax: 503.210.6265

www.chinookmaterials.com

-----------------------------------------------
Disclaimer - Chinook Materials, Inc.

This message (including any attachments) is intended only for the use  
of the individual or entity to which it is addressed and may contain  
information that is non-public, proprietary, privileged, confidential,  
and exempt from disclosure under applicable law. If you are not the  
intended recipient, you are hereby notified that any use,  
distribution, or copying of this communication is strictly prohibited.  
Although steps have been taken to check for viruses, the recipient(s)  
should also check to ensure messages are virus free.

On Jan 13, 2009, at 10:00 AM, thelist-request at lists.evolt.org wrote:

Send thelist mailing list submissions to
	thelist at lists.evolt.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.evolt.org/mailman/listinfo/thelist
or, via email, send a message with subject or body 'help' to
	thelist-request at lists.evolt.org

You can reach the person managing the list at
	thelist-owner at lists.evolt.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of thelist digest..."


Today's Topics:

   1. Re:  business videos: upload to Google *and* YouTube?
      (Jack Timmons)
   2. Re:  Email Marketing - client keeps getting account	suspended
      (Joel D Canfield)
   3.  URL Includes (Jack Timmons)
   4.  mysql error using select to update (Bob Meetin)
   5. Re:  URL Includes (Nan Harbison)
   6. Re:  URL Includes (Jack Timmons)
   7. Re:  mysql error using select to update (Paul Bennett)
   8. Re:  URL Includes (Matt McKeon)
   9. Re:  URL Includes (Judah McAuley)
  10. Re:  URL Includes (Jack Timmons)
  11. Re:  mysql error using select to update (Jack Timmons)
  12. Re:  Email Marketing - client keeps getting	accountsuspended
      (Chris Dempsey)
  13. Re:  Email Marketing - client keeps gettingaccountsuspended
      (Nan Harbison)
  14. Re:  Email Marketing - client keeps getting	accountsuspended
      (Sarah Adams)
  15. Re:  Email Marketing - client keeps gettingaccountsuspended
      (Joel D Canfield)
  16.  Javascript addEventListener fail (Barney Carroll)
  17. Re:  Javascript addEventListener fail (Jason Handby)
  18. Re:  Javascript addEventListener fail (Matt Warden)
  19. Re:  Javascript addEventListener fail (Barney Carroll)


----------------------------------------------------------------------

Message: 1
Date: Mon, 12 Jan 2009 12:00:23 -0600
From: "Jack Timmons" <jorachim at gmail.com>
Subject: Re: [thelist] business videos: upload to Google *and*
	YouTube?
To: "thelist at lists.evolt.org" <thelist at lists.evolt.org>
Message-ID:
	<619a2e2e0901121000t4b19905ci9d793c30e2d1a302 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Mon, Jan 12, 2009 at 11:51 AM, Joel D Canfield <
Joel at commonsenseentrepreneur.com> wrote:

>> seen), and probably the best way to find videos is either take the
> time to
>> search sites separately, or rely on a plain ol' Google search.
>
> Thanks, Jack. I know Google's video search will search YouTube videos,
> but it appears not to work the other way 'round. So, if I and my  
> clients
> have only uploaded our videos to Google, they're not getting found on
> YouTube.
>
> But that's an assumption based on very little research and evidence,  
> so
> I'm looking for something a little more concrete before I go start
> manually uploading a couple dozen videos all over again, and  
> retraining
> my clients to use YouTube as their primary instead of Google video.
>
> joel
>
>
I would in all honesty move to YouTube. In that case, you can use  
their API
with your web system, including you own payer, etc if you want, and be  
able
to have your clients upload or what have you without having to create
accounts, etc. I've only briefly looked into it (we're probably going  
to use
it for a website we're working on since it saves us from having to worry
about it), but it seems like it would be the best for you.

Im my opinion, it's always better to provide your clients with the  
best you
can offer them. I'm sure retraining won't be an issue at all  
(especially if
you don't mind them uploading videos to one account and having your  
site or
what have you manage where they go).

-- 
-Jack Timmons
http://www.trotlc.com
Twitter: @jorachim


------------------------------

Message: 2
Date: Mon, 12 Jan 2009 10:02:36 -0800
From: "Joel D Canfield" <Joel at CommonsenseEntrepreneur.com>
Subject: Re: [thelist] Email Marketing - client keeps getting account
	suspended
To: <thelist at lists.evolt.org>
Message-ID:
	<72E9FAA171D63B48AAC707C72900E6B40195FF33 at ireland.spinhead.com>
Content-Type: text/plain;	charset="us-ascii"

> - any other comments or suggestions?

my first suggestion goes back upstream a ways: when someone signs up for
something free, email the download link to them. pretty much guarantees
you'll get a valid address, but at the very least, you'll weed out the
dead ones.

> They cleaned it out some, got access back and were suspended again
> following the second email.

Constant Contact can provide a report of all bounces due to nonexistent
address. if all those are removed, shouldn't that solve the problem? why
were they suspended the second time?

CC is telling them their list is faulty. if it's full of garbage, the
solution is to clean up the list. if they've annoyed CC enough by
sending out two dirty lists, they can't expect CC to be accessories to
spamming, right?

perhaps I'm not clear on what problem we're trying to solve.

joel



------------------------------

Message: 3
Date: Mon, 12 Jan 2009 12:39:41 -0600
From: "Jack Timmons" <jorachim at gmail.com>
Subject: [thelist] URL Includes
To: "thelist at lists.evolt.org" <thelist at lists.evolt.org>
Message-ID:
	<619a2e2e0901121039n4c292323mec3428d4b45435ca at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Alright, I'm actually stumped on this.

With url fopen on, switching servers for a website caused URL includes  
to
not work.

Now, mind you, I wouldn't do URL includes unless instructed to, this  
is just
the older coding on the site breaking with the move, and I can't come  
with
an explanation as to why, be it because it's something I should be  
noticing,
or that Plesk setups are evil and it's even more of an excuse to move to
onsite hosting.

-- 
-Jack Timmons
http://www.trotlc.com
Twitter: @jorachim


------------------------------

Message: 4
Date: Mon, 12 Jan 2009 11:40:35 -0700
From: Bob Meetin <bobm at dottedi.biz>
Subject: [thelist] mysql error using select to update
To: "thelist at lists.evolt.org" <thelist at lists.evolt.org>
Message-ID: <496B8EA3.5050308 at dottedi.biz>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

This is Joomla, but I think that is immaterial:

update jos_content set attribs = (select attribs from jos_content where
id=191) where id=180;

ERROR 1093 (HY000): You can't specify target table 'jos_content' for
update in FROM clause

I am guessing this means that I cannot use the same table for both the
select and update.  If so, what is a workaround?

-- 
Bob Meetin




------------------------------

Message: 5
Date: Mon, 12 Jan 2009 13:44:00 -0500
From: "Nan Harbison" <nan at nanharbison.com>
Subject: Re: [thelist] URL Includes
To: <thelist at lists.evolt.org>
Message-ID: <A60AC6C58942418E84A67A5429BB91CC at nancyb0bda4ba6>
Content-Type: text/plain;	charset="us-ascii"

Is fopen enabled? I think you can use this funtion to enable it:


-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Jack Timmons
Sent: Monday, January 12, 2009 1:40 PM
To: thelist at lists.evolt.org
Subject: [thelist] URL Includes

Alright, I'm actually stumped on this.

With url fopen on, switching servers for a website caused URL includes  
to
not work.

Now, mind you, I wouldn't do URL includes unless instructed to, this  
is just
the older coding on the site breaking with the move, and I can't come  
with
an explanation as to why, be it because it's something I should be  
noticing,
or that Plesk setups are evil and it's even more of an excuse to move to
onsite hosting.

--
-Jack Timmons
http://www.trotlc.com
Twitter: @jorachim
-- 

* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester and  
archives
of thelist go to: http://lists.evolt.org Workers of the Web, evolt !



------------------------------

Message: 6
Date: Mon, 12 Jan 2009 13:16:26 -0600
From: "Jack Timmons" <jorachim at gmail.com>
Subject: Re: [thelist] URL Includes
To: nan at nanharbison.com, "thelist at lists.evolt.org"
	<thelist at lists.evolt.org>
Message-ID:
	<619a2e2e0901121116i1b9204b6mc222b6d24d057db5 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Mon, Jan 12, 2009 at 12:44 PM, Nan Harbison <nan at nanharbison.com>  
wrote:

> Is fopen enabled? I think you can use this funtion to enable it:
>
>
Yep,

"With url fopen on, switching servers for a website caused URL  
includes to
not work."

-- 
-Jack Timmons
http://www.trotlc.com
Twitter: @jorachim


------------------------------

Message: 7
Date: Tue, 13 Jan 2009 08:28:33 +1300
From: Paul Bennett <Paul.Bennett at wcc.govt.nz>
Subject: Re: [thelist] mysql error using select to update
To: "'bobm at dottedi.biz'" <bobm at dottedi.biz>,
	"'thelist at lists.evolt.org'" <thelist at lists.evolt.org>
Message-ID:
	<4FE55112B64A5B479A534E3A6A9B344C4961F6A981 at exchmb3.net.ad.wcc.govt.nz>
	
Content-Type: text/plain; charset="us-ascii"

Hi Bob,

Are you doing this on the command line? If so, you can use mysql  
variables to store the information from the select query:

@attribs := select attribs from jos_content where id=191;

update jos_content set attribs =  @attribs where id=180;

Or am I missing something?

Paul;


------------------------------

Message: 8
Date: Mon, 12 Jan 2009 14:34:37 -0500
From: Matt McKeon <matt at camadro.com>
Subject: Re: [thelist] URL Includes
To: "thelist at lists.evolt.org" <thelist at lists.evolt.org>
Message-ID: <496B9B4D.8030402 at camadro.com>
Content-Type: text/plain; charset=ISO-8859-1

Jack Timmons wrote:
> Alright, I'm actually stumped on this.
>
> With url fopen on, switching servers for a website caused URL  
> includes to
> not work.
>
> Now, mind you, I wouldn't do URL includes unless instructed to, this  
> is just
> the older coding on the site breaking with the move, and I can't  
> come with
> an explanation as to why, be it because it's something I should be  
> noticing,
> or that Plesk setups are evil and it's even more of an excuse to  
> move to
> onsite hosting.
>
>
Have you checked the firewall of the  server hosting the files? It may
be blocking your new servers IP.

Just a shot in the dark.


------------------------------

Message: 9
Date: Mon, 12 Jan 2009 11:20:01 -0800
From: "Judah McAuley" <judah at wiredotter.com>
Subject: Re: [thelist] URL Includes
To: "thelist at lists.evolt.org" <thelist at lists.evolt.org>
Message-ID:
	<cbf1fcf00901121120h4ac99ff3s40f7280016b25622 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

My first guess is that the new server can't resolve the urls you are
including. Try doing a lookup from the command line or using curl to
resolve the urls and see if it is a local dns issue.

Judah

On Mon, Jan 12, 2009 at 10:39 AM, Jack Timmons <jorachim at gmail.com>  
wrote:
> Alright, I'm actually stumped on this.
>
> With url fopen on, switching servers for a website caused URL  
> includes to
> not work.
>
> Now, mind you, I wouldn't do URL includes unless instructed to, this  
> is just
> the older coding on the site breaking with the move, and I can't  
> come with
> an explanation as to why, be it because it's something I should be  
> noticing,
> or that Plesk setups are evil and it's even more of an excuse to  
> move to
> onsite hosting.
>
> --
> -Jack Timmons
> http://www.trotlc.com
> Twitter: @jorachim
> --


------------------------------

Message: 10
Date: Mon, 12 Jan 2009 14:07:50 -0600
From: "Jack Timmons" <jorachim at gmail.com>
Subject: Re: [thelist] URL Includes
To: "thelist at lists.evolt.org" <thelist at lists.evolt.org>
Message-ID:
	<619a2e2e0901121207j7e5c2cffg8b1718964f1f5a3 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Mon, Jan 12, 2009 at 1:34 PM, Matt McKeon <matt at camadro.com> wrote:

> Have you checked the firewall of the  server hosting the files? It may
> be blocking your new servers IP.
>
> Just a shot in the dark.
>

Apologies, let me clarify:

The site was previously coded referencing itself in the URL's.  
Specifically,
the coder at the time didn't know a better method, so in order to pass
variables to a PHP included script, they were doing:

http://thissite.com/scriptname.php?getvariable=value

While I know that's not called for, that's how it was done. I -doubt-  
it's
the firewall, since I know port 80 is open (unless php is making  
requests to
a different port).


On Mon, Jan 12, 2009 at 1:20 PM, Judah McAuley <judah at wiredotter.com>  
wrote:

> My first guess is that the new server can't resolve the urls you are
> including. Try doing a lookup from the command line or using curl to
> resolve the urls and see if it is a local dns issue.
>
> Judah
>

It could still be a DNS issue, but...

Now that I've been thinking about it, this happened right after we  
changed
domain names. I'm wondering if someone didn't set the Apache  
configuration
up correctly or something.

In either case, I'm about ready to give up finding the answer and simply
waiting until I can recode the site. Thanks for everyone's ideas. I'm  
afraid
I don't even have all the information I'd need to solve it myself, let  
alone
paint a decent technical picture for others to be able to solve it.


-- 
-Jack Timmons
http://www.trotlc.com
Twitter: @jorachim


------------------------------

Message: 11
Date: Mon, 12 Jan 2009 12:50:54 -0600
From: "Jack Timmons" <jorachim at gmail.com>
Subject: Re: [thelist] mysql error using select to update
To: bobm at dottedi.biz, "thelist at lists.evolt.org"
	<thelist at lists.evolt.org>
Message-ID:
	<619a2e2e0901121050u3d33313fh7c40f253fa11247e at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Mon, Jan 12, 2009 at 12:40 PM, Bob Meetin <bobm at dottedi.biz> wrote:

> This is Joomla, but I think that is immaterial:
>
> update jos_content set attribs = (select attribs from jos_content  
> where
> id=191) where id=180;
>
> ERROR 1093 (HY000): You can't specify target table 'jos_content' for
> update in FROM clause
>
> I am guessing this means that I cannot use the same table for both the
> select and update.  If so, what is a workaround?
>
> --
> Bob Meetin
>

This is a rough outline of what I'd do:

<?
    $arr = mysql_fetch_assoc(mysql_query("SELECT attrs FROM table  
WHERE id =
#"));
    $terms = array();
    foreach($arr as $k=>$v)
        $terms[] = "$k = '$v'";

    mysql_query("UPDATE table SET ".implode(", ",$terms)." WHERE id =  
#");
?>

But I'm pretty lazy right now, and can't afford to look up SQL  
workarounds.
-- 
-Jack Timmons
http://www.trotlc.com
Twitter: @jorachim


------------------------------

Message: 12
Date: Tue, 13 Jan 2009 08:12:03 -0000
From: "Chris Dempsey" <chris at gettheedgeonline.com>
Subject: Re: [thelist] Email Marketing - client keeps getting
	accountsuspended
To: <thelist at lists.evolt.org>
Message-ID:
	<2B56E445B5CFF24FA32E2F4FB0112F220E2D7C at sbserver.theedge.local>
Content-Type: text/plain;	charset="us-ascii"

Appreciate the comments Joel.  I know my query was a little vague, I
suppose I just wanted confirmation that our own thoughts are valid and
that any other email marketing provider would have the same policies as
Constant Contact.

> Why were they suspended the second time?
Just the sheer volume of spam reports.  The mailing list is years old so
some people on it probably won't even remember signing up, plus the
email goes out from the client group name rather than their individual
operator names who people are more likely to be familiar with.

> CC is telling them their list is faulty. if it's full of garbage, the
solution is to clean up the list.
Totally agree, I think the problem comes from the client previously
being able to email the full list via Outlook or similar with no
repercussions and now they are a bit frustrated as the emails do
generate significant business for them.

I think maybe some client education/training is the way forward.

Chris

-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Joel D Canfield
Sent: 12 January 2009 18:15
To: thelist at lists.evolt.org
Subject: Re: [thelist] Email Marketing - client keeps getting
accountsuspended

> - any other comments or suggestions?

my first suggestion goes back upstream a ways: when someone signs up for
something free, email the download link to them. pretty much guarantees
you'll get a valid address, but at the very least, you'll weed out the
dead ones.

> They cleaned it out some, got access back and were suspended again
> following the second email.

Constant Contact can provide a report of all bounces due to nonexistent
address. if all those are removed, shouldn't that solve the problem? why
were they suspended the second time?

CC is telling them their list is faulty. if it's full of garbage, the
solution is to clean up the list. if they've annoyed CC enough by
sending out two dirty lists, they can't expect CC to be accessories to
spamming, right?

perhaps I'm not clear on what problem we're trying to solve.

joel

-- 

* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !




------------------------------

Message: 13
Date: Tue, 13 Jan 2009 06:14:29 -0500
From: "Nan Harbison" <nan at nanharbison.com>
Subject: Re: [thelist] Email Marketing - client keeps
	gettingaccountsuspended
To: <thelist at lists.evolt.org>
Message-ID: <02209E6B588E4FE9BBB638295F54D835 at nancyb0bda4ba6>
Content-Type: text/plain;	charset="US-ASCII"

You could tell your client that all of these email marketing companies  
HAVE
to be on top of their customers not abusing their services because if  
they
allow abuse, they risk getting blocked by all the big ISPs. It would put
them out of business.

Nan

-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Chris Dempsey
Sent: Tuesday, January 13, 2009 3:12 AM
To: thelist at lists.evolt.org
Subject: Re: [thelist] Email Marketing - client keeps
gettingaccountsuspended

Appreciate the comments Joel.  I know my query was a little vague, I  
suppose
I just wanted confirmation that our own thoughts are valid and that any
other email marketing provider would have the same policies as Constant
Contact.

> Why were they suspended the second time?
Just the sheer volume of spam reports.  The mailing list is years old so
some people on it probably won't even remember signing up, plus the  
email
goes out from the client group name rather than their individual  
operator
names who people are more likely to be familiar with.

> CC is telling them their list is faulty. if it's full of garbage, the
solution is to clean up the list.
Totally agree, I think the problem comes from the client previously  
being
able to email the full list via Outlook or similar with no  
repercussions and
now they are a bit frustrated as the emails do generate significant  
business
for them.

I think maybe some client education/training is the way forward.

Chris

-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Joel D Canfield
Sent: 12 January 2009 18:15
To: thelist at lists.evolt.org
Subject: Re: [thelist] Email Marketing - client keeps getting
accountsuspended

> - any other comments or suggestions?

my first suggestion goes back upstream a ways: when someone signs up for
something free, email the download link to them. pretty much guarantees
you'll get a valid address, but at the very least, you'll weed out the  
dead
ones.

> They cleaned it out some, got access back and were suspended again
> following the second email.

Constant Contact can provide a report of all bounces due to nonexistent
address. if all those are removed, shouldn't that solve the problem? why
were they suspended the second time?

CC is telling them their list is faulty. if it's full of garbage, the
solution is to clean up the list. if they've annoyed CC enough by  
sending
out two dirty lists, they can't expect CC to be accessories to spamming,
right?

perhaps I'm not clear on what problem we're trying to solve.

joel

-- 

* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester and  
archives
of thelist go to: http://lists.evolt.org Workers of the Web, evolt !


-- 

* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester and  
archives
of thelist go to: http://lists.evolt.org Workers of the Web, evolt !



------------------------------

Message: 14
Date: Tue, 13 Jan 2009 10:36:50 -0400
From: Sarah Adams <sarahwbs at gmail.com>
Subject: Re: [thelist] Email Marketing - client keeps getting
	accountsuspended
To: "thelist at lists.evolt.org" <thelist at lists.evolt.org>
Message-ID: <496CA702.1090000 at gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

> Just the sheer volume of spam reports.  The mailing list is years  
> old so
> some people on it probably won't even remember signing up, plus the
> email goes out from the client group name rather than their individual
> operator names who people are more likely to be familiar with.

Maybe you could convince your client to run a new opt-in campaign so
that only those who *still* want the mailings will get them.

-- 
sarah adams
my thoughts: http://twitter.com/sarahwbs
my son: http://clarkeadams.com
my work: http://sarah.designshift.com


------------------------------

Message: 15
Date: Tue, 13 Jan 2009 06:14:42 -0800
From: "Joel D Canfield" <Joel at CommonsenseEntrepreneur.com>
Subject: Re: [thelist] Email Marketing - client keeps
	gettingaccountsuspended
To: <thelist at lists.evolt.org>
Message-ID:
	<72E9FAA171D63B48AAC707C72900E6B40195FF61 at ireland.spinhead.com>
Content-Type: text/plain;	charset="us-ascii"

> I think maybe some client education/training is the way forward.

absolutely. people need to learn about permission marketing if they
wanna continue succeeding on the web.

perhaps suggest Seth Godin's book by that name, 'Permission Marketing' ?
or his latest, 'Tribes'-both excellent commentary on building and
maintaining relationships, and why it's not only the ethical choice, but
the best business choice.

(then maybe they'll read his seven books in between and be the
best-marketed biz in their field.)

joel



------------------------------

Message: 16
Date: Tue, 13 Jan 2009 15:40:13 +0000
From: Barney Carroll <barney.carroll at gmail.com>
Subject: [thelist] Javascript addEventListener fail
To: "thelist at lists.evolt.org" <thelist at lists.evolt.org>
Message-ID:
	<472577830901130740x19406d2x26218f18c192b131 at mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

Hi guys,

This has always stumped me. Usually I end up going about the problem a
completely different way and drop addEventListener completely, but I'd  
like
to get to the bottom of what I'm missing.

Here is the problematic line of script:

th3s[i].addEventListener('click', 'changeTab('+i+')', false);

This is inside a for loop, and the event needs to be evaluated ? which I
can't seem to make it do. Firebug tells me that it "could not convert
JavaScript argument" on this line.

th3s is an array of elements and they're all fine. I'm working out how  
to do
this the ECMA way, so don't put it down to IE not understanding that
function ? I'll deal with it when I can make this work in the real  
world.


Regards,
Barney Carroll
Web designer & front-end developer

t: +44 (0) 7594 506 381


------------------------------

Message: 17
Date: Tue, 13 Jan 2009 15:47:13 -0000
From: "Jason Handby" <jason.handby at corestar.co.uk>
Subject: Re: [thelist] Javascript addEventListener fail
To: <thelist at lists.evolt.org>
Message-ID:
	<9A50776858A21848A96469CDFCBCDEFF020EA088 at exch-be12.exchange.local>
Content-Type: text/plain;	charset="utf-8"

> Here is the problematic line of script:
>
> th3s[i].addEventListener('click', 'changeTab('+i+')', false);
>

The second argument to addEventListener needs to be a function, not a  
string.


J


------------------------------

Message: 18
Date: Tue, 13 Jan 2009 10:47:56 -0500
From: Matt Warden <mwarden at gmail.com>
Subject: Re: [thelist] Javascript addEventListener fail
To: "thelist at lists.evolt.org" <thelist at lists.evolt.org>
Message-ID:
	<bbc8fa430901130747k6e6a5f76o95c5973b0148f6d2 at mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

On Tue, Jan 13, 2009 at 10:40 AM, Barney Carroll
<barney.carroll at gmail.com> wrote:
> Here is the problematic line of script:
>
> th3s[i].addEventListener('click', 'changeTab('+i+')', false);
>
> This is inside a for loop, and the event needs to be evaluated ?  
> which I
> can't seem to make it do. Firebug tells me that it "could not convert
> JavaScript argument" on this line.

Are you just trying to get a reference to the element that triggered
changeTab()? You do not need to pass in 'i' for that.

http://mattwarden.com/sandbox/getidfromeventhandler.js

-- 
Matt Warden
Cincinnati, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.


------------------------------

Message: 19
Date: Tue, 13 Jan 2009 16:07:53 +0000
From: Barney Carroll <barney.carroll at gmail.com>
Subject: Re: [thelist] Javascript addEventListener fail
To: "thelist at lists.evolt.org" <thelist at lists.evolt.org>
Message-ID:
	<472577830901130807q556b5063o79050aff7db439ed at mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

Jason, I tried this after throwing the whole thing in led it to  
execute as
and when it occurred in the code ? basically I was trying to make it
evaluate the statement. Which I now realise is silly.

Matt, thanks a lot for that. As it happens, I *can* get all the info I  
need
from the source element. I had no idea about event.srcElement ?  
powerfully
wicked stuff. So much for evals ;)



Regards,
Barney Carroll
Web designer & front-end developer

t: +44 (0) 7594 506 381


2009/1/13 Matt Warden <mwarden at gmail.com>

> On Tue, Jan 13, 2009 at 10:40 AM, Barney Carroll
> <barney.carroll at gmail.com> wrote:
>> Here is the problematic line of script:
>>
>> th3s[i].addEventListener('click', 'changeTab('+i+')', false);
>>
>> This is inside a for loop, and the event needs to be evaluated ?  
>> which I
>> can't seem to make it do. Firebug tells me that it "could not convert
>> JavaScript argument" on this line.
>
> Are you just trying to get a reference to the element that triggered
> changeTab()? You do not need to pass in 'i' for that.
>
> http://mattwarden.com/sandbox/getidfromeventhandler.js
>
> --
> Matt Warden
> Cincinnati, OH, USA
> http://mattwarden.com
>
>
> This email proudly and graciously contributes to entropy.
> --
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>


------------------------------

_______________________________________________
Help: http://lists.evolt.org/mailman/listinfo/thelist

Archives: http://lists.evolt.org

End of thelist Digest, Vol 71, Issue 14
***************************************




More information about the thelist mailing list