Forums

Form validation in IE7

andrew40 17 Sep, 2007
Installed the latest version, compiled a simple form which works perfectly in FF and shows OK in IE7.

However the form validation when user clicks download in IE7 and proceeds to download page. Email does get sent but is blank [because form not filled in].

any ideas.

Link is http://www.claremontgardens.co.uk and click the download button to get to form..

thanks
Max_admin 18 Sep, 2007
Hi Andrew,

I see this, but there is some JS errors in the page (use FirFox extension FireBug to see them), any JS error will make problems with the validation as its in JS too!!

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
andrew40 18 Sep, 2007
Thanks, but the javascript works in FF?

The js errors refer to different javascript files. I am using the chronoform inbuilt validation and don't see how this would effect IE7?

The js files used are the standard ones used in Joomla, namely slimbox.js and validation.js and they are not used on this page..
Max_admin 18 Sep, 2007
Hi Andrew,

The validation should work fine in both FF and IE, the IE7 is showing a js error, the Firebug does too, please fix them and Iam sure all will be fine😉

by the way, something at your template is using the mootools.js file, this may make some interference with the validation js files too!!

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
andrew40 19 Sep, 2007
So are you saying you cannot use mootools with form validation? As a lot of Joomla sites now use Mootools then this would make it extremely hard to use form validation.

Not sure how to fix slimbox and the joomla validation.js as this is inbuilt into Joomla and may affect other areas?
Max_admin 19 Sep, 2007
Hi Andrew,

The validation in Chronoforms is using another popular library lled : prototype/scriptaculous , you cant use both prototype/scriptaculous and mootools at the same page, for some explaination please read this :

http://forum.mootools.net/viewtopic.php?id=1964#post-9356

I wish this answers all your questions ?

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
andrew40 19 Sep, 2007
thanks, that explains it but how do I remove mootools.js from just one page?
Max_admin 19 Sep, 2007
If the refernce line is hardcodes in the template file then you will need to switch it off with some PHP code in the template file index.php :

if($option == 'com_chronocontact'){


if its loaded in am odules then you can turn off modules at this page!

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
andrew40 20 Sep, 2007
Done all this and stopped the javascripts running on the page of the form.

Still does not work in IE7🙂)
Max_admin 21 Sep, 2007
Andrew, I agree, Just a question, how do you get the "Download now" image to submit the form, it seems that problem is here, look at IE7 status bar area once you click the image, a js error icon appears, can your replace this image with a normal submit button and see ? if it works then take your time to fix the image code😉

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
andrew40 21 Sep, 2007
Ok, have changed the image to a form button, same thing happens in IE7..
Max_admin 21 Sep, 2007
Hi Andrew,

I see, this needs some debugging so you know where this js error appears, by default the validation doesn't give errors and work well on FF and IE versions.

Sincerely,

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
andrew40 22 Sep, 2007
It appears as it is a chronoengine js error, as the form script works perfectly well on its own with no errors. Its a very simple form...

there is no javascript other than chronoengine running now..
Max_admin 22 Sep, 2007
Hi Andrew,

I agree there is no javascript but Chronoforms one now, however Iam sure the validation code runs very well on IE7, want to make sure ? run it with the default joomla template😉

anyway, there MUST be something wrong with the HTML source of your page, I searched the error appears in IE7 and there may be too many reasons for this like unclosed tags...etc so you should start trial and error till you get it🙂

Best regards,

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
andrew40 26 Sep, 2007
Still can't get to the bottom of it, as the form appears to work correctly in sll other browsers.
andrew40 26 Sep, 2007
Here is my form script as entered into the form code box in chronforms and using the inbuilt validator.



<style type="text/css">
<!--
div.chronoform {display:none;}

.manageField {
	padding-bottom:70px;
}
.contactLeft {
	float:left;
	width:50%;
}
.contactLeft p {font-size:11px;}
.contactLeft input {margin-top:2px;width:80%;}
.contactRight {
	float:right;
	width:45%;
}
.quote {
	margin:5px 0 15px 20px;
	padding:10px;
	border:«»solid 1px #86cf51;
	border-top:0;border-bottom:0;
	background:#edffe9;
	font-size:10px !important;
	line-height:160%;
	color:#8f8c8c;
	float:left;
}
input, textarea {
	border:«»solid 1px #CCC;
	font-size:18px;
	font-weight:normal;
	color:#777;
	padding:2px 4px;
}

.style3 {color: #FF00FF}
-->
</style>
 <div class="contactLeft">   
   <h4 class="style1">Please enter your details so we can send you further information.</h4> 
         <p>First & Last Name<br /> 
   <input type="text" name="name" value="" />
   <span class="style3">*</span></p>    
         <p>Address 1<br />   
   <input type="text" name="Address1" value="" />
   <span class="style3">*</span></p>
         <p>Address 2<br />   
   <input type="text" name="Address2" value="" /></p>
   <p>Town / City<br />   
   <input type="text" name="town" value="" />
   <span class="style3">*</span></p>
   <p>Post Code<br />   
   <input type="text" name="pcode" value="" />
   <span class="style3">*</span></p>
  	<p>Email Address<br />  
    <input type="text" name="email"  value="" />
    <span class="style3">*</span></p> 
    <p>Telephone Number<br />   
    <input type="text" name="phone"   value="" />
    <span class="style3">*</span></p>   
    <p>How did you hear about us?<br />  
    <input type="text" name="hear"  value="" /></p>   
    </div> <div class="contactRight">   
    
    <div class="quote">  
    <h3>What else can we help you with?</h3>

    <h4><font color="#000000"><strong>Royal Bay Claremont</strong></font></h4>
    <p> 86 Barrick Lane<br />
Aldwick<br />
Bognor Regis, W.Sussex PO21 4DG<br />
T – 0800 027 7222<br />
<br />
<strong>For General Inquiries, contact:</strong></p>
    <p><strong><font color="#00ccff">Vivianne Messiah </font></strong><br />

M – 0800 027 7222 <br />
E – <a href="mailto:info@claremontgardens.co.uk">info@claremontgardens.co.uk</a></p>
    <input type="submit" name="Submit" value="Submit">
<br />
<span class="style3">*Required Fields </span> 
      </div>     </div>
<br><br>Post edited by: admin, at: 2007/09/26 13:57
Max_admin 26 Sep, 2007
Hi Andrew,

Looking at the code I can't see anything wrong, do you have any joomla test site with the default template ? test it there and if your code works then there is some problem with your template!!:)

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
andrew40 28 Sep, 2007
I have spoken to a developer and the template guys and there reply was this,

"Well, the template is not loading any scripts to conflict with the forms on that page so it cannot be a conflict with the template"

I have tested it on a blank joomla install and it does the same...
Max_admin 28 Sep, 2007
Hi Andrew,

try to replace the scripts folder then inside components/com_chronocontact/js/ may be some files are corrupted, Iam sure the validation works at FF,IE6,7 ,OPERA , I tested this myself earlier and made it on many websites too!!🙂

also please try to clear your browser cache may be it causes the error on the blank joomla install too.

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
craigs 23 Jan, 2008
admin wrote:

If the reference line is hardcodes in the template file then you will need to switch it off with some PHP code in the template file index.php :

if($option == 'com_chronocontact'){
if its loaded in a module then you can turn off modules at this page!

This may be out of the scope of the problem but I just developed this problem.

I want to include the JS file for Slimbox in only certain pages that are in the com_content section. Is there a variable I could reference to see what category I am in in the index.php file. That is something similar to the $option variable.

Thanks

Edited to clean up quote<br><br>Post edited by: GreyHead, at: 2008/01/23 18:44
GreyHead 23 Jan, 2008
Hi craigs,

You're probably better asking this in the Joomla forums. Assuming that Slimbox is in a module then I'm not sure that you have access to the content object for the page . . .

Can you not do this by limiting the publication of the module to certain pages?

Bob
craigs 24 Jan, 2008
Actually it isn't in a module. I just included a few .js files in the template's index.php inside the <head> tags to make it work.

<script type="text/javascript" src="js/mootools.v1.1.js"></script>
<script type="text/javascript" src="js/slimbox.js"></script>


I haven't created a module that wasn't based off another yet so I'm still learning Joomla in that fashion. If I could put that in a module inside of the <head> tags and only included that module on certain pages, that would be ideal. But again, not quite sure how to create a separate module that would just contain those 2 lines. The "mootools.v1.1.js" in fact is what breaks the validation script included in ChronoForms which is why I'm trying to do this in the first place.

Post edited by: craigs, at: 2008/01/24 15:09<br><br>Post edited by: craigs, at: 2008/01/24 15:10
GreyHead 25 Jan, 2008
Hi craigs,

Which version of Joomla are you using? If it's Joomla 1.0.x then the latest version of ChronoForms can use the Mootools library which should then remove the conflict.

I guess that will also be in the next Joomal 1.5 release but I don't know when that will be.

For the more specific answer $option == 'com_content' should identify content pages for you.

Bob
craigs 25 Jan, 2008
I'm using 1.5 RC4.

I also just noticed that <jdoc:include type="head" /> in the index.php template file translates into
  <base href="http://www.boice.net/joomla/index.php/gems-division" />
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="robots" content="index, follow" />
  <meta name="keywords" content=".." />
  <meta name="description" content="..." />
  <meta name="generator" content="Joomla! 1.5 - Open Source Content Management" />
  <title>...</title>
  <link href="/joomla/index.php/gems-division?format=feed&type=rss" rel="alternate" type="application/rss+xml" title="RSS 2.0" />
  <link href="/joomla/index.php/gems-division?format=feed&type=atom" rel="alternate" type="application/atom+xml" title="Atom 1.0" />
  <link href="/joomla/templates/rhuk_milkyway/favicon.ico" rel="shortcut icon" type="image/x-icon" />
  <script type="text/javascript" src="/joomla/media/system/js/mootools.js"></script>
  <script type="text/javascript" src="/joomla/media/system/js/caption.js"></script>


notice the mootools.js?! So natively it is including some version of mootools that is working with the form validation, but when I tried to include another version, it caused a conflict. Also however, slimbox doesn't work with the included version of mootools.
GreyHead 25 Jan, 2008
Hi craigs,

Joomla 1.5 uses Mootools as it's native Javascript library so it's loaded on many pages). That's why the ChronoForms Prototype based validation hiccups in 1.5.

Bob
craigs 25 Jan, 2008
you said its loaded on many pages so that implies that it is not loaded on some pages.

is it possible to edit what is in the <jdoc:include type="head"> on different pages? that is, to do what I originally wanted to do but from the joomla backend instead of php coding it.
GreyHead 25 Jan, 2008
Hi craigs,

Yes it's certainly loaded in he admin pages and maybe in some on the front end, I guess it depends what's on the page.

Can you put that on separate pages? Probably but I don't know how, sorry.

Bob
This topic is locked and no more replies can be posted.