well i'd just like to say thanks to all the people who helped me with the problems i had

and i want to show you what i have actually been creating!

A USER CUSTOMIZATION SECTION

which lets my users create their own style sheets for my site

heres the link to the project

http://www.theutherfish.com/users/

i'm sorry in advance if advertising is not allowed, even though i am only trying to show some code 🙂

thanks again for the help, any cooments on my work would be great and acknowledged so i can see where i'm going wrong

Jon 😉

    u got a damn small font..
    it is blurred in my XP box... IE 6

      "Colors must be numerical..." Actually, it uses hexidecimals, which can contain letters A-F and numbers 0-9.

      Looks pretty good, though. My only advise (other than the error above) is to put all the register input boxes into a table, so they're aligned better.

        My suggestion would be to use a pop-up box to allow the user to click on the color he wants to use. You could recycle the same popup box for each input.

        Also, create a sample window either on that page that changes dynamically, or a popup that I can check occasionally, so that I can see the effect my colors are going to have.

        Other than that -- I'm liking it so far!

          Yes, a popup is a good idea. People tend to like visual aids.

            ah yes i forgot about those, heres me who uses hex all the time "short term memory loss kicks in again"

            yeh pop up box good idea, i'll get to work 😃

            thanks for the tip

            and on the note that the font is 2 small, thats why i brought in a user customization, so it has its benefits kinda.

            well must get back to work

            Jon 🙂

              errr.....i aint very good with java, does anyone know how this "pop up box" could be achieved?!

                The page inside the pop-up box itself is simply a php page that you design, with each color clickable. When the user clicks the color, the box closes, and the appropriate field in the original window is updated.

                As for the javascript itself, it's not that hard. You basically use the window.open method. Try here for a good tutorial on popups using javascript. For more tutorials, you can just google it.

                If you want to VERY cool stuff to use on your site, check out brainjar.com. Even if you don't use it, they have some very cool stuff using CSS and Javascript.

                Good Luck!

                  hey,

                  thanks for the links they refreshed my mind a bit on java, i think i need another full run through of the damn thing! :S

                  however i am still in a mystery of how i can update a form field using this pop up page

                  although i have built something with php i've still got quite a way to go before i can class my self as a well learnt php coder

                  so if there are any tutorials or something similar to the update field script, which i need i would glady apreciate the link or code or even some help in where to go

                  thanks alot Jon 😉

                    First of all... this is Javascript, not Java. Even though the names are similar, they are two completely different things.

                    Let's say you have an input field that requests background color. You name it "bgcolor" with the name="bgcolor" attribute. Let's also say that your form is named "myform."

                    If you wanted to change the value of that field to "#FFFFFF" using Javascript, you use:

                    window.document.myform.bgcolor.value="#FFFFFF"

                    The problem is... you need to accept input from another window. the above code will try to access the field from the popup window, and of course that wouldn't work.

                    What would really help is if the original window (with the form) could be accessed by the popup window. The good news is, it can. simply use the opener object, and you're good to go.

                    A link on your popup window that chooses blue, for example, might say:

                    <a href="#" onclick="sendColor('#0000FF')">#0000FF</a>

                    The sendColor() javascript function would simply be:

                    function sendColor(color) {
                    	opener.document.myform.bgcolor.value = color;
                    	window.close();
                    }
                    

                    This was all done right now off the top of my head, so if there is anything in there that isn't exactly right, I apologize. If you need much more Javascript help, I suggest you go to a Javascript forum or buy a good book.

                    Good Luck!

                      thanks very much that worked a treat 😃

                      and sorry about the terminology i shall remeber its javascript

                      not java as in the applets

                      thanks alot Jon 🙂

                        If ya really wanna get funky and have singing and dancing CSS, you could have a grid of appropriately coloured buttons instead of text links. Can look quite pretty.

                        table#colourpicker{border-collapse:collapse;border-spacing:0px;}
                        table#colourpicker td{padding:0px;}
                        table#colourpicker input{border:1px solid white inset;width:20px;height:20px;}

                        <table id="colourpicker">
                        <tr><td><input type="button" onClick="sendColor('#0000ff')" style="background-color:#0000ff;"/></td><td><input...></td><td><input...></td></tr>
                        <tr>...</tr>
                        ...
                        </table>

                        ...OTTOMBH

                          well if you have looked at my current colour picker it actually is a grid with the relevant colours on it,
                          but now thanks to the help from these fine peeps
                          it will have a little link on it updating a form

                          i also know that you could have just the table cells as links using onclick inside the td tag

                          thanks all the same 😉

                          btw what does

                          OTTOMBH

                          mean?!

                            Off the top of my head, I'd say it means

                            "Off the top of my bald head."

                            😃

                              Originally posted by Weedpacket
                              ...You could have a grid of appropriately coloured buttons instead of text links.

                              And you could write a program that outputs all the buttons so you don't have to do it manually. Once you have the source, just use that instead of the program.

                                Well, here's a starter that uses reds and yellows (it's just the color list from Paint Shop Pro):

                                <style>
                                input.colorpicker {
                                  border: 1px solid white inset;
                                  width: 20px;
                                  height: 20px;
                                }
                                </style>
                                <table cellpadding="2" cellspacing="0">
                                <?php
                                $red = array("FF0000","400000","800000","C00000",
                                              "FF4040","FF8080","FFC0C0","000000");
                                $yellow = array("FFFF00","404000","808000","C0C000",
                                                "FFFF40","FFFF80","FFFFC0","202020");
                                $colors = array("red","yellow"); // Colors to cycle through
                                foreach ($colors as $color) {
                                  $mycolor = $$color;
                                  echo("  <tr>\n");
                                  for ($i=0;$i<count($mycolor);$i++) {
                                    $curcolor = $mycolor[$i];
                                    echo <<<END
                                    <td><input class="colorpicker" type="button" onClick="sendColor('#0000ff')" style="background-color:$curcolor;" value="&nbsp;&nbsp;"></td>
                                
                                END;
                                  }
                                  echo("  </tr>\n");
                                }
                                ?>
                                </table>

                                I'm sure you can figure it out from there!
                                It uses Weedpacket's input.colorpicker (well, changed around). Seems his bald headed code was lacking in places and superfluous in others, but that's no matter. 🙂

                                  Originally posted by Mordecai
                                  I'm sure you can figure it out from there!
                                  It uses Weedpacket's input.colorpicker (well, changed around). Seems his bald headed code was lacking in places and superfluous in others, but that's no matter. 🙂

                                  No matter indeed. Mr. Weedpacket doesn't give out code, he gives out suggestions, ideas, and fixes. Unless you count the contests. Otherwise it's about education, and thought, thinking for one's self, so to speak...not that he's perfect, or some programming deity, but I'd cut him a tad o' slack meself....

                                  </rant> heh, heh, was I really?🙂