• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Prompt Form Elements by Clicking Table Cell Content

 
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to prompt some form elements at the bottom of a table when the content (i.e., text) of a certain table cell is clicked by users.

I have tried to Google but was unable to provide proper key words to find the relevant JavaScript examples. I use IE6.

The code below has a problem. The table disappears after its cell is clicked. I expect the "table" still stays on the screen and whatever prompted by clicking is to be displayed at the bottom of the "table" because the "table" will still a part of the form.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can not use document.write after tha page is loaded.

You either want to show/hide hidden elements or build the form using DOM [aka document.createElement()]/innerHTML.

Eric
 
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This should help to get you started:

[ May 09, 2007: Message edited by: Dom Lassy ]
 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot, Dom. I can work from here on. It is a good start.
reply
    Bookmark Topic Watch Topic
  • New Topic