Openers & passing values

They have: 330 posts

Joined: Apr 2000

I have a page with a popup window which worked fine. For display reasons I added a few other tables bordering each TD and now the popup window has stopped.

Here's the code

<?php
<HTML>
<
HEAD>
&
lt;script LANGUAGE=\"JavaScript\"&gt;
<!--
function PickColor(value)
    {
    opener.color = value;
    opener.restart();
    self.close();
    }
//-->
&lt;/script&gt;
</HEAD>

<BODY BGCOLOR=\"#C0C0C0\" TOPMARGIN=2 LEFTMARGIN=5>

<form name=\"ColorPicker\" onSubit=\"PickColor()\">
<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"1\">
<tr>
    <td><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"1\">
                    <tr>
                   
                        <td bgColor=\"#000000\"
                            onClick=\"PickColor('#000000')\">&nbsp;</td>
                   
                        <td bgColor=\"#333333\"
                            onClick=\"PickColor('#333333')\">&nbsp;</td>
                   
                        <td bgColor=\"#666666\"
                            onClick=\"PickColor('#666666')\">&nbsp;</td>
                   
                        <td bgColor=\"#999999\"
                            onClick=\"PickColor('#999999')\">&nbsp;</td>
                   
                        <td bgColor=\"#CCCCCC\"
                            onClick=\"PickColor('#CCCCCC')\">&nbsp;</td>
                   
                        <td bgColor=\"#FFFFFF\"
                            onClick=\"PickColor('#FFFFFF')\">&nbsp;</td>
                   
                        </td>
...
?>

Nothing happens when I click on a color. Any suggestions?

- Using IE.

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Other than the typo? In the form, it says onSubit, instead of onSubmit.

I'm really bad at troubleshooting JavaScript, though.

Smiling Suzanne

(had to edit -- I got the typo wrong! lol!)

They have: 330 posts

Joined: Apr 2000

You seem really good at it here. That is the problem.

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

*laugh* well that's a first!

Glad the problem is resolved.

Smiling S

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.