glenelkins Posted November 28, 2006 Share Posted November 28, 2006 HiI am integrating an open source Javascript colour picker into a PHP project. All well and good when its supposed to work and does'nt!! Basically it pops up, you select the colour and it puts the colour code into a form field box.Here is an example of the form page, this version works fine:[code]<form name="layout"><table> <tr><td><input type="text" name="colour"></td><td><a href="javascript:TCP.popup(document.forms['layout'].elements['colour'])">Colour Picker</a></tr></table></form>[/code]The above works perfect (the javascript file is included in the head tags). But if I use the following it pops up the colour picker, but does not put the value into the box[code]<form name="layout"><div><table> <tr><td><input type="text" name="colour"></td><td><a href="javascript:TCP.popup(document.forms['layout'].elements['colour'])">Colour Picker</a></tr></table></div></form>[/code]This is just a sample, the <div> is actually there for a reason in the real code, but why is this stopping the script from working? Quote Link to comment https://forums.phpfreaks.com/topic/28732-strange-problem/ Share on other sites More sharing options...
glenelkins Posted November 30, 2006 Author Share Posted November 30, 2006 ? Quote Link to comment https://forums.phpfreaks.com/topic/28732-strange-problem/#findComment-132655 Share on other sites More sharing options...
fenway Posted December 6, 2006 Share Posted December 6, 2006 Could be lots of things... impossible to say at this point. Quote Link to comment https://forums.phpfreaks.com/topic/28732-strange-problem/#findComment-135991 Share on other sites More sharing options...
Cep Posted December 6, 2006 Share Posted December 6, 2006 Have you tried moving the divs to surround the form elements as well? Quote Link to comment https://forums.phpfreaks.com/topic/28732-strange-problem/#findComment-136087 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.