Forums

Validation not working in IE6,7,8

ai.bhargav 19 Mar, 2012
Hi,
I am having form validation issue in IE6,7,8 however its working perfectly in Firefox,IE9,IE10,Chrome
I have tried to check in IE7,8, its showing 1 javascript error,
null' is null or not an object
Can anyone please help to sort out this issue ?
I am using
-Chronoform 3.0 J1.5 BETA 2
-PHP Version 5.2.17
-Joomla! 1.5.9 Production/Stable

Here is a form link if you would like to take a quick look..
http://www.lockaway.co.uk/get-a-quote.html

Thanks in advance,

Regards,
Bhargav
GreyHead 19 Mar, 2012
Hi Bhargav,

I don't see any error in IE8? Have you now fixed it?

Bob

PS All the code you are using is very, very old :-(
ai.bhargav 19 Mar, 2012
Hi Bob,
Thanks for your quick response.No i could not able to fixed it yet.
When we submit form in IE6,7,8 , its directly submit the form and redirecting to thank you page even though all fields are empty.
Yes its very old :-( Please suggest what can i do to fix this ? Is it possible to fix this without any upgrade to joomla or chronoform ?

Thanks,

Bhargav
ai.bhargav 20 Mar, 2012
Hey Bob,

You are right, i have checked form in friends pc and they also not see any error in IE8 and ie7,however it still submit form without checking for validation. I thought it might be caching issues with my pc but even after clear all caching,i am getting same error in IE.
I tried other suggestions as well from related forum bugs posted...but not succeed :-(
Do you found any hint related this issue ?

Thanks,

Bhargav
GreyHead 20 Mar, 2012
Hi Bhargav,

Your submit button input doesn't have a name attribute. Try adding name='submit' or name='submit_btn' and see if that makes a difference - ChronoForms uses the input names to identify them.

Bob
ai.bhargav 20 Mar, 2012
Yes Bob,
i tried to put name='submit' before as well, and again after you suggested, even i tried by put id="submit" but it doesn't make any difference.

Bhargav
GreyHead 20 Mar, 2012
Hi Bhargav,

I dug a bit further and the JavaScript error that shows up in IE8 appears to come from a new input being created by the statusChange script that you are running on the 'Your Title' input.

Bob
ai.bhargav 20 Mar, 2012
Thanks Bob for looking further in it.

yes there is already pre-written Javascript function called StatusChange which having some AJAX code, but i think its not necessary. so i removed it from form now...and its working fine in Firefox and other modern browsers, but not in IE6,7,8 only.
Can you please check now is it still having any issue?
Frankly saying i am not that good with AJAX...so please let me know if you would need to look in function.


Bhargav
GreyHead 20 Mar, 2012
Hi Bhargav,

This is nothing much to do with ChronoForms. Please see these two inputs which are now the focus of the error

<table width='98%' cellpadding='5px' cellspacing='1px' border=0 align=center bgcolor='#FFFFFF' >
<input type='hidden' name='i' id='i' value='1'>
<input type="hidden" name="insert_id" id="insert_id" value="1">

<tr>


I'm not sure if they are allowed in between a <table> and <tr> tag - that may be why IE is complaining.

Bob
ai.bhargav 20 Mar, 2012
Thank You So Much Bob,

Yes it was the only issue, very small yet very big issue....It's working fine now :-)

Thank you very much for pointing me to right path....You are really a MASTER...:-) Keep it up

With Thanks & Warm Regards,

Bhargav
GreyHead 22 Mar, 2012
Hi Jason,

I see an JavaScript error in FireFox before I get near to opening IE

document.getElementById is not a function
[Break On This Error]
var element = document.getElementById(eid);



This is probably because your template (or some other component) is loading the jQuery JavaScript library.

Out of the box jQuery isn't compatible with the MooTools library used by Joomla! and ChronoForms. You can use jQuery with MooTools in no-conflict mode. There are various ways of doing this. The simplest - which may or may not work - is to add a line of script in the ChronoForms Form JavaScript box:
jQuery.noConflict();
This will free the $ operator which is used by MooTools, so you may need to update your own javascripts to use the longer jQuery operator.

There is also a neat plugin named JB Library from Joomla! Bamboo that allows you to control on which pages jQuery is loaded, and will always load it in no-conflict mode. However this requires that JQuery is loaded using the Joomla Document object methods.

I have a tutorial on Resolving jQuery problems that explores some of the issues an diagnostics and shows how to modify one template example to use the Joomla! Document methods to load JQuery in noConflict mode.

Bob
ai.bhargav 23 Mar, 2012
Hi Bob & Jason,

i have also looked at your url in ie, its showing me different error
"Jquery is undefined"
i think it may being used before jquery has been loaded.

Regards,
Bhargav
Jason75 29 Mar, 2012
Thanks Bob & Bhargav,

IE9 is the culprit. Will continue to try and fix. Bob, followed your document, changes to complicated as it differed from your solution. Might see if I can remove the jQuery element from that page only.

Thanks,,

Jason
GreyHead 29 Mar, 2012
Hi Jason,

if the problem is only in IE9 then you may fixing it by forcing the form page back into IE8 browser mode. See this post for a way to do that.

Bob
Jason75 01 Apr, 2012
Thanks Bob,

Forced to IE8 browser, works like a treat. Will leave for now.

Cheers,

Jason
thomaskremer 02 Apr, 2012
I'm having a problem similar to Bhargav:

I am having form validation issue in IE6,7,8 however its working perfectly in Firefox,IE9,IE10,Chrome
I have tried to check in IE7,8, its showing 1 javascript error,
null' is null or not an object



IE9 says:

Unable to get value of the property 'addClass': object is null or undefined



I tried quite a lot, but can't figure out what the problem could be...

Bob, could you please have a look at my form:
http://stjan.org/nl/index.php?option=com_chronoforms&chronoform=inschrijving&id=2593&Itemid=1339 ?

Thanks for you help!
Thomas
GreyHead 02 Apr, 2012
Hi Thomas,

Your template (or some other component) is loading the jQuery JavaScript library.

Out of the box jQuery isn't compatible with the MooTools library used by Joomla! and ChronoForms. You can use jQuery with MooTools in no-conflict mode. There are various ways of doing this. The simplest - which may or may not work - is to add a line of script in the ChronoForms Form JavaScript box:
jQuery.noConflict();
This will free the $ operator which is used by MooTools, so you may need to update your own javascripts to use the longer jQuery operator.

There is also a neat plugin named JB Library from Joomla! Bamboo that allows you to control on which pages jQuery is loaded, and will always load it in no-conflict mode. However this requires that JQuery is loaded using the Joomla Document object methods.

I have a tutorial on Resolving jQuery problems that explores some of the issues an diagnostics and shows how to modify one template example to use the Joomla! Document methods to load JQuery in noConflict mode.

Bob
thomaskremer 02 Apr, 2012
I finally could make it work.
I installed JB Library and disabled the chronoform files for my form.

Thanks!
Thomas
This topic is locked and no more replies can be posted.