[Proto-Scripty] Re: replace an anchor around a tablecell

2008-09-30 Thread josher565

The reason why I have an anchor around a td is because the client has
specified to me they want to use one of these lightbox
implementations. There's a bunch of unstandardized implementations out
there, but they are quick and easy to use. For me, I'd prefer to use
some form of prototype object that knew how to do the lightbox.
Unfortunately, I don't have that leeway. So despite my quick and dirty
example code, is there a quick and dirty way to do this. Code or
comment is greatly appreciated.

Josh

On Sep 29, 5:11 pm, T.J. Crowder [EMAIL PROTECTED] wrote:
 Hi,

 There are several problems with that markup.  1. You use double quotes
 in your JavaScript alert when the attribute is wrapped in double
 quotes.  2. You don't have a closing double quote on something (hard
 to say what, given #1).  3. a is not a valid child of tr.  That's
 off the top of my head, there may be other problems.

 The W3C validator may be useful:http://validator.w3.org/

 I don't understand the requirement as stated well enough to suggest
 something else.

 FWIW,
 --
 T.J. Crowder
 tj / crowder software / com

 On Sep 29, 9:27 pm, josher565 [EMAIL PROTECTED] wrote:

  Here's some example code:
  html
  head/head
  body
  table
  tr
   a id=killme href=# onclick=javascript:alert(I've been
  clicked)td id=wrappedtdI'm a Cell!!/td/a
  /tr
  /table
  /body
  /html

  in a separate ajax call, I'm looking to use the Element.replace
  function to replace the anchor with the outerHTML of the innermost
  cell (wrappedtd in my example). See below:

  function MrAjax()
  {
     Element.replace(killme, $(wrappedtd).outerHTML)

  }

  The requirements state that I must be using the anchor and I have no
  other option. The anchor must be deleted by some means, leaving the
  wrapped cell. Your attention is appreciated.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: replace an anchor around a tablecell

2008-09-30 Thread T.J. Crowder

Hi,

 The reason why I have an anchor around a td is because the client has
 specified to me they want to use one of these lightbox
 implementations.

I'm not seeing why you need to put an anchor *around* the table cell
to use lightbox.

Echoing what Justin said:  What's the real requirement, the real
goal?  Clearly they didn't tell you Put an anchor around the table
cell.  If they did, you'll have to educate them.  It's like someone
telling a plumber to fit the drain pipe from the bathtub so it empties
into the toilet.  It might work after a fashion in some situations
(although it's more likely to overflow the toilet), but it's clearly
wrong and no plumber worth hiring would actually do it.
--
T.J. Crowder
tj / crowder software / com

On Sep 30, 2:00 pm, josher565 [EMAIL PROTECTED] wrote:
 The reason why I have an anchor around a td is because the client has
 specified to me they want to use one of these lightbox
 implementations. There's a bunch of unstandardized implementations out
 there, but they are quick and easy to use. For me, I'd prefer to use
 some form of prototype object that knew how to do the lightbox.
 Unfortunately, I don't have that leeway. So despite my quick and dirty
 example code, is there a quick and dirty way to do this. Code or
 comment is greatly appreciated.

 Josh

 On Sep 29, 5:11 pm, T.J. Crowder [EMAIL PROTECTED] wrote:

  Hi,

  There are several problems with that markup.  1. You use double quotes
  in your JavaScript alert when the attribute is wrapped in double
  quotes.  2. You don't have a closing double quote on something (hard
  to say what, given #1).  3. a is not a valid child of tr.  That's
  off the top of my head, there may be other problems.

  The W3C validator may be useful:http://validator.w3.org/

  I don't understand the requirement as stated well enough to suggest
  something else.

  FWIW,
  --
  T.J. Crowder
  tj / crowder software / com

  On Sep 29, 9:27 pm, josher565 [EMAIL PROTECTED] wrote:

   Here's some example code:
   html
   head/head
   body
   table
   tr
    a id=killme href=# onclick=javascript:alert(I've been
   clicked)td id=wrappedtdI'm a Cell!!/td/a
   /tr
   /table
   /body
   /html

   in a separate ajax call, I'm looking to use the Element.replace
   function to replace the anchor with the outerHTML of the innermost
   cell (wrappedtd in my example). See below:

   function MrAjax()
   {
      Element.replace(killme, $(wrappedtd).outerHTML)

   }

   The requirements state that I must be using the anchor and I have no
   other option. The anchor must be deleted by some means, leaving the
   wrapped cell. Your attention is appreciated.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: replace an anchor around a tablecell

2008-09-29 Thread T.J. Crowder

Hi,

There are several problems with that markup.  1. You use double quotes
in your JavaScript alert when the attribute is wrapped in double
quotes.  2. You don't have a closing double quote on something (hard
to say what, given #1).  3. a is not a valid child of tr.  That's
off the top of my head, there may be other problems.

The W3C validator may be useful:
http://validator.w3.org/

I don't understand the requirement as stated well enough to suggest
something else.

FWIW,
--
T.J. Crowder
tj / crowder software / com

On Sep 29, 9:27 pm, josher565 [EMAIL PROTECTED] wrote:
 Here's some example code:
 html
 head/head
 body
 table
 tr
  a id=killme href=# onclick=javascript:alert(I've been
 clicked)td id=wrappedtdI'm a Cell!!/td/a
 /tr
 /table
 /body
 /html

 in a separate ajax call, I'm looking to use the Element.replace
 function to replace the anchor with the outerHTML of the innermost
 cell (wrappedtd in my example). See below:

 function MrAjax()
 {
    Element.replace(killme, $(wrappedtd).outerHTML)

 }

 The requirements state that I must be using the anchor and I have no
 other option. The anchor must be deleted by some means, leaving the
 wrapped cell. Your attention is appreciated.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---