[ic] IE 6.0.2 Errors On Empty Fields

Stefan Hornburg racke at linuxia.de
Fri Oct 28 10:55:49 EDT 2005


On Fri, 28 Oct 2005 10:31:11 -0400 (EDT)
Randy Just <randyjust at justcomp.com> wrote:

> I am having a funky problem with IE 6.0.2 on the shipping.html to billing.html transition.
> 
> Unless *all fields* are filled out on the shipping.html page (company, address2, etc.), IE gives an error and asks if I want to go into debug mode.  I say yes and it stops at lines where the fields were left blank.  The fields being left blank are non-required fields.  If I populate them,
> then IE doesn't complain.
> 
> I am using for the most part unmodified html pages from the Interchange demo system.
> 
> I am a javascript neophyte, so I am uncertain why Mozilla would be OK with things and IE would have a problem.  I suspect if I "stuffed" a value into a blank field, then IE would be OK, but I would rather correct the root problem.
> 
> This is what comes up on the debug screen with the error pointing to the blank lines (i.e. var b_company):
> 
> <SCRIPT>
> var b_fname = 'Sally';
> var b_lname = 'Smith';
> var b_company = ;
> var b_address1 = 'PO Box 5555';
> var b_address2 = ;
> var b_city = 'Anchorage';
> var b_state = 'AK';
> var b_zip = '95555';
> var b_country = 'US';
> var b_phone = '208-555-1212';
> function do_address (form, clear) {
>         if(clear) {
> 
> 
> 
> <SCRIPT>

Apply this patch to code/UI_Tag/jsq.coretag:

--- jsq.coretag	8 Oct 2004 20:41:49 -0000	1.4
+++ jsq.coretag	8 Nov 2004 18:27:54 -0000	1.5
@@ -19,6 +19,7 @@
 		  or 
 		( s/'/\\'/g,  s/\r/\\r/g, s/(^|[^\\])\$\{?(\w+)\}?/$1' + $2 + '/g, $_ = qq{'$_'} );
 	}
+	@lines = "''" unless @lines;
 	return join (" +\n", @lines);
 }
 EOR

This should fix your problem.

Bye
	Racke


-- 
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team



More information about the interchange-users mailing list