| Author |
Message |
junkingusa New Member


Joined: Feb 21, 2005 Posts: 9
|
Posted:
Mon Feb 21, 2005 5:27 pm |
|
Hoplessly lost here! .. I'm writting a new module for phpnuke 7.5.
My first problem is that I'm trying to include a javascript color picker. I downloaded Tigra Color Picker
but it is confussing me. I will freely admit that I know nothing about javascripts. I saw the instructions on wraping some code around it but not sure what to do then.
well phoooy, I tried to show the code example and I was accused of a hack attack! and I did use the code brackets ... darn, what do I do now? |
|
|
|
 |
Raven Site Admin/Owner

Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
|
Posted:
Mon Feb 21, 2005 9:20 pm |
|
Make sure your script tags are modified (to post) like <scr ipt> |
|
|
|
 |
junkingusa New Member


Joined: Feb 21, 2005 Posts: 9
|
Posted:
Tue Feb 22, 2005 9:15 am |
|
Thanks! ... I thought I had figured out the problem, fixed it and it still doesn't work! grrrr ... There is a whole lot of code in this so I don't want to paste it all, I'll just copy in what I think is revelant and maybe you can tell me what I messed up! Or; maybe it just wont work in phpnuke?
This is what I put in my_header.php .. I did change the path to the full path ...
| Code: | | <sc---t language=Java----- src="picker.js"></sc----t> |
one of the things I tried was to copy the entire content of picker.js into my_header, but that didn't make any difference.
There is a file called picker.html that the path is in picker.js, I changed it to use the full url to point to the correct picker.html that contains in part this code:
| Code: |
<form>
<tr><td align="center">
<select name="type" onchange="P.C(this.selectedIndex)" class="s">
<option>Web Safe Palette</option>
<option>Windows System Palette</option>
<option>Grey Scale Palette</option>
<option>Mac OS Palette</option>
</select>
</td></tr>
<tr><td align="center">
<sc---t language="JavaS-----">
var P = opener.TCP;
onload = "P.show(P.initPalette)";
document.forms[0].elements[0].selectedIndex = P.initPalette;
P.draw(window, document);
</sc---t>
|
then this is what I inserted into my file, where I want it to show up.
| Code: |
echo "< input type=\"text\" name=\"input0\">"
. "<a href=\"javas-----:TCP.popup(document.forms['tcp_test'].elements['input0'])\"><img alt=\"Click Here to Pick up the color\" src=\"modules/$module_name/img/sel.gif\"></a>";
|
Which is where I hope that I messed it up. It does show up ok, but when clicking on the icon I get an error ...
any ideas? Thank you! |
|
|
|
 |
Raven Site Admin/Owner

Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
|
Posted:
Tue Feb 22, 2005 12:07 pm |
|
Please zip/rar and email it to me at raven (at) ravenphpscripts (dot) com |
|
|
|
 |
junkingusa New Member


Joined: Feb 21, 2005 Posts: 9
|
Posted:
Tue Feb 22, 2005 12:22 pm |
|
Thanks Raven, what all do you want in the zip? The original color picker files and my page that I want to insert it at? ... |
|
|
|
 |
Raven Site Admin/Owner

Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
|
Posted:
Tue Feb 22, 2005 12:36 pm |
|
|
|
 |
junkingusa New Member


Joined: Feb 21, 2005 Posts: 9
|
Posted:
Tue Feb 22, 2005 12:44 pm |
|
OK, it's on it's way! ... Thank you again! |
|
|
|
 |
|
|
|
|