Hi
I'm new to php and this has been bugging me no end, I'm sure it's an easy problem, but if someone could point me in the right direction it would be most appreciated.
I'm updating a JS calender on a shopping cart to one thats cross-browser compatible.
The calender shows on the onFocus event of a text box, now the old code works fine. (Except it doesn't work in NS/FireFox)
This is the original code
$tmp_html = '<input type="text" name ="id[' . TEXT_PREFIX . $products_options_name['products_options_id'] . ']" size="' . $products_options_name['products_options_length'] .'" maxlength="' . $products_options_name['products_options_length'] . '" value="' . $cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$products_options_name['products_options_id']] .'" onfocus="getCalendarForProduct(this, \'' . (int)$HTTP_GET_VARS['products_id']. '\')" > ' . $products_options_name['products_options_comment'] ;
And this is the change I've made
$tmp_html = '<input type="text" name ="id[' . TEXT_PREFIX . $products_options_name['products_options_id'] . ']" size="' . $products_options_name['products_options_length'] .'" maxlength="' . $products_options_name['products_options_length'] . '" value="' . $cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$products_options_name['products_options_id']] .'" onFocus="showCalendar('''',this,this,'getCurrentDate()','holder',0,30,1)" > . ';
I'm sure I have the syntax wrong, maybe not escaping something? ...
I hope someone can help me see where i'm going wrong.
All the best, and happy new year.
Martin