hey peeps!
Basically im having some trouble with putting values into fields as well as changing the <td bgcolor> depending on the <a href> link clicked.
I pull data from a database in ASP and create a table and then each row is a different form. Each form contains 2 text fields named 'bkg_color' and the other 'font_color'.
Table/Form Sample
[tt]
-------------------------------------------------------------------------------------------------------------------------------------
| FORM | BACKGROUND | COLOR | Background Colors | FONT COLOR | COLOR | Font Colors | FORM |
| NAME | COLOR | SAMPLE | (click link to see color) | | SAMPLE | (Click link to see color) | BUTTONS |
-------------------------------------------------------------------------------------------------------------------------------------
| Form1 | bkg_color | empty1_td1 | *Red* / *Blue / *Green* | 'font_color' | empty1_td2 | *Red* / *Blue / *Green* | btn_Update |
-------------------------------------------------------------------------------------------------------------------------------------
| Form2 | bkg_color | empty2_td1 | *Red* / *Blue / *Green* | 'font_color' | empty2_td2 | *Red* / *Blue / *Green* | btn_Update |
-------------------------------------------------------------------------------------------------------------------------------------
| Form3 | bkg_color | empty3_td1 | *Red* / *Blue / *Green* | 'font_color' | empty3_td2 | *Red* / *Blue / *Green* | btn_Update |
-------------------------------------------------------------------------------------------------------------------------------------
| Form4 | bkg_color | empty4_td1 | *Red* / *Blue / *Green* | 'font_color' | empty4_td2 | *Red* / *Blue / *Green* | btn_Update |
-------------------------------------------------------------------------------------------------------------------------------------
| Form5 | bkg_color | empty5_td1 | *Red* / *Blue / *Green* | 'font_color' | empty5_td2 | *Red* / *Blue / *Green* | btn_Update |
-------------------------------------------------------------------------------------------------------------------------------------
[/tt]
What I want todo is for each row/form, you can click one of the 'Color' links and it puts the hex code of the color into the relevant text field and also changes the <TD bgcolor> so you can see a sample.
A javascript function something like:
Function changeNewColor(destinationForm,td_target,newColor) {
}
Everything I try reports errors and I cant get the syntax correct...thats if the above is even possible
Thanks to anyone that can help!
- FateFirst
Basically im having some trouble with putting values into fields as well as changing the <td bgcolor> depending on the <a href> link clicked.
I pull data from a database in ASP and create a table and then each row is a different form. Each form contains 2 text fields named 'bkg_color' and the other 'font_color'.
Table/Form Sample
[tt]
-------------------------------------------------------------------------------------------------------------------------------------
| FORM | BACKGROUND | COLOR | Background Colors | FONT COLOR | COLOR | Font Colors | FORM |
| NAME | COLOR | SAMPLE | (click link to see color) | | SAMPLE | (Click link to see color) | BUTTONS |
-------------------------------------------------------------------------------------------------------------------------------------
| Form1 | bkg_color | empty1_td1 | *Red* / *Blue / *Green* | 'font_color' | empty1_td2 | *Red* / *Blue / *Green* | btn_Update |
-------------------------------------------------------------------------------------------------------------------------------------
| Form2 | bkg_color | empty2_td1 | *Red* / *Blue / *Green* | 'font_color' | empty2_td2 | *Red* / *Blue / *Green* | btn_Update |
-------------------------------------------------------------------------------------------------------------------------------------
| Form3 | bkg_color | empty3_td1 | *Red* / *Blue / *Green* | 'font_color' | empty3_td2 | *Red* / *Blue / *Green* | btn_Update |
-------------------------------------------------------------------------------------------------------------------------------------
| Form4 | bkg_color | empty4_td1 | *Red* / *Blue / *Green* | 'font_color' | empty4_td2 | *Red* / *Blue / *Green* | btn_Update |
-------------------------------------------------------------------------------------------------------------------------------------
| Form5 | bkg_color | empty5_td1 | *Red* / *Blue / *Green* | 'font_color' | empty5_td2 | *Red* / *Blue / *Green* | btn_Update |
-------------------------------------------------------------------------------------------------------------------------------------
[/tt]
What I want todo is for each row/form, you can click one of the 'Color' links and it puts the hex code of the color into the relevant text field and also changes the <TD bgcolor> so you can see a sample.
A javascript function something like:
Function changeNewColor(destinationForm,td_target,newColor) {
}
Everything I try reports errors and I cant get the syntax correct...thats if the above is even possible
Thanks to anyone that can help!
- FateFirst