Re: Javascript Question

by "Rossi Designs" <webmaster(at)rossidesigns.net>

 Date:  Sun, 19 Mar 2000 23:01:32 -0500
 To:  "David Haverly" <dave(at)tektutor.com>,
<hwg-techniques(at)hwg.org>
 References:  tektutor
  todo: View Thread, Original
This is not tested I'm writing it directly into this email

function setcolor(color) {
opener.document.formName.back_color_temp.value=color;
self.close();
}

of coarse you'll need to surround your back_color_temp input in between
<form name="formName"> & </form> tags because as it is Netscape probably
won't render it. (of coarse I only use Netscape for testing)

each of your table cells would have to be changed. for example

<TD BGCOLOR="#FFFFCC">FFFFCC</TD>

would need to be

<TD BGCOLOR="#FFFFCC"><a
href="javascript:setcolor('ffffcc')">FFFFCC</a></TD>

Rossi Designs
(904) 226-8979
P.O. Box 1084, Holly Hill, Florida 32125-1084
http://rossidesigns.net
----- Original Message -----
From: David Haverly <tektutor(at)tektutor.com>
To: <hwg-techniques(at)hwg.org>
Sent: Sunday, March 19, 2000 8:48 PM
Subject: Javascript Question


| Here's a "how do you do it" question:
|
| Go to www.tektutor.com/chart/list.htm
| I want to autofill the text box based on a users choice from a pop up
window
| when they click the color code link. Currently a user has to go to the
color
| chart which has a link next to the text box. Then choose a color, but have
| to either remember the code, cut & paste it or write it down and go back
to
| the text box form and fill it in. I would like to use javascript so they
can
| click on the box, bring up the color chart and then click on a color and
| have the code automatically fill into the box and close the color chart.
The
| chart would only open in a small window of course.
|
| Is this possible?
|
| Best Regards,
|
| David Haverly
| TekTutor Computer Services
| Web Design, Hosting & Promotion
| Computer Tutoring
| Tel: 941.766.9355
| dave(at)tektutor.com
| http://www.tektutor.com
|
|
|

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA