Forums

submit doesn't work in IE7

fmejia 12 Feb, 2009
Hello all, I am having an issue with my form the submit button doesn't work with IE7 but it works with Firefox, when I submit it in IE7 I get an error about not being able to access "this.form" but in the html code in my form I don't have anything called "this.form" please.. help me here..!!

I attached a screenshot of the error. and I have tried in several computers, I also tried in IE6 and it does the same.

[attachment=0]error.jpg[/attachment]
GreyHead 12 Feb, 2009
HI fmejia.

This is a JavaScript error. Somewhere you have a script that is trying to access 'this.form' and 'this.form' isn't defined.

Is your page on-line as this isn't strictly a ChronoForms problem and can't be solved without looking at it.

Bob
fmejia 12 Feb, 2009
hi, thank you for your reply, I am really thankful to know that you didn't just looked at my post and ignored it, as it happens in many other forums..!!!😟 no my form is not online cause it will be used in an intranet, all I've used in my form is joomla and chronoforms, is there something I can copy and paste or a screen shot that can be used to take a look at it and you can give me a hand with it ..😶
GreyHead 12 Feb, 2009
Hi fmejia,

There's no form name in the link you have in that error image. Does the form work if you open it using the link in the Form Manager?

Bob
fmejia 12 Feb, 2009
yes it works in the form manager and it works perfect if I use it in firefox
GreyHead 12 Feb, 2009
Hi fmejia,

[sendfb][/sendfb]
Bob
fmejia 12 Feb, 2009
thank you very much.!! here it is.. let me know if rar is ok, otherwise I'll make it zip.
GreyHead 13 Feb, 2009
Hi fmejia,

I can't get the same error as you do - though I get a couple of others. I think that the main problem is that you have <form . . > and </form> tags inside your form html (two of each) - this is guaranteed to break the form. It looks like some kind of Microsoft webbot - please remove them and I suspect (hope) that the errors will go away.

Bob
fmejia 14 Feb, 2009
you are a life saver.!! God bless you.. thank you very much I was really disapointed about my form.!! is working now.. still getting an error but is saving the data... and that's enogh for me, I have one more question, I actually used MS frontpage to my modify my form and now the form "validation" is not working, I will check if I have some other code from frontpage somewhere that is causing this but if you see something on it, please let me know...!! and again... thank you ..!! God bless all you do...
fmejia 20 Feb, 2009
hello... is me again...🙂 I can't get my validation to work in my form.... I edited the html to put the form in a table, but I have no idea what am I missing for it to work, can you give me a hand? here is my code... or is it just that the validation won't work when the form is in a table? thank you in advance for your help..




<table width="543">
	<tr>
		<td width="164"><font face="Tahoma">
                <label class="cf_label">Case#</label></font></td>
		<td width="47"><font face="Tahoma">:</font></td>
		<td>
			<font size="3">
			<div  class="form_item">
			<div class="form_element cf_textbox">
			<input class="cf_inputbox required validate-number" maxlength="150" size="21" id="case" name="case" type="text"></font><div class="clear">
			</div>
			<div class="clear"> </div>
			</div>
		</td>
	</tr>


	<tr>
		<td colspan="3"> </td>
	</tr>
	
	
	<tr>
		<td width="164"><font face="Tahoma"><label class="cf_label">Service Tag / Order #</label></font></td>
		<td width="47"><font face="Tahoma">:</font></td>
		<td>
			<div  class="form_item">
			<div class="form_element cf_textbox"></div>
				<font size="3">
				<input class="cf_inputbox required" maxlength="150" size="21" id="text_5" name="tag_ord" type="text"></font>
                                <font color="#FF0000">*   </font>
				</td>
			</div>
			</div>
			<div class="clear"> </div>
	</tr>
	
	
	<tr>
		<td colspan="3"> </td>
	</tr>
	
	
	<tr>
		<td width="164"><font face="Tahoma"><label class="cf_label">DPS#</label></font></td>
		<td width="47"><font face="Tahoma">:</font></td>
		<td>
			<font size="3" face="Tahoma">
				<div  class="form_item">
				<div class="form_element cf_textbox">
				<font size="3">
				<input class="cf_inputbox validate-number" maxlength="150" size="21" id="text_6" name="dps" type="text"></font>
			</font>
				</div>
				</div>	
			<div class="clear"></div>
		</td>
	</tr>
	

	<tr>
		<td colspan="3"> </td>
	</tr>
	
	
	<tr>
		<td width="164"><font face="Tahoma"><label class="cf_label">Session ID</label></font></td>
		<td width="47"><font face="Tahoma">:</font></td>
		<td>
			<div  class="form_item">
			<div class="form_element cf_textbox">
				<font size="3">
				<input class="cf_inputbox validate-number" maxlength="150" size="21" id="text_7" name="sessionid" type="text"></font>
                                <font color="#FF0000">*</font>
			</div>
			</div>	
			<div class="clear"></div>
		</td>
	</tr>
	
	
	<tr>
		<td colspan="3"> </td>
	</tr>
	
	
	<tr>
		<td width="164"><font face="Tahoma"><label class="cf_label">Agent Name</label></font></td>
		<td width="47"><font face="Tahoma">:</font></td>
		<td style="border-bottom-style: none; border-bottom-width: medium">
			<div class="form_item">
			<div class="form_element cf_dropdown">
			    <?php
				    $db =& JFactory::getDBO();
				    $query = "
			        SELECT name
			        FROM `jos_agents`";
				    $db->setQuery($query);
				    $rows = $db->loadResultArray();
			    ?>
			    <font size="3">
			    <select name="agent name">
			    onFocus = "select one"
				    <?php
					    foreach ($rows as $row) {
				        echo "<option value='$row'>$row</option>";
					    }
				    ?>
			    </select></font>
			<font color="#FF0000">*</font>
			</div>
			</div>
			<div class="clear"></div>
		</td>
	</tr>
	
	
	<tr>
		<td colspan="3"> </td>
	</tr>
	
		<tr>
		<td colspan="2">
			<font face="Tahoma"><font size="3"><input value="Yes" class="radio" id="OSRI" name="OSRI" type="checkbox"></font>
			<label for="OSRI" class="check_label">OSRI</label></font>
		</td>
		<td> </td>
	</tr>
	
	<tr>
		<td width="164">
			<div  class="form_item">
			<div class="form_element cf_radiobutton">
				<font face="Tahoma">
				<fieldset style="padding: 2">
					<legend>Resolved</legend>
				<div class="float_left">
					<font size="3">
					<input value="Yes" class="radio validate-one-required" id="resolved_yes" name="resolved_yes" type="radio" ></font>
					<label for="resolved_yes" class="radio_label">Yes</label><br>
					<font size="3">
					<input value="No" class="radio" id="resolved_no" name="resolved_no" type="radio" checked></font>
					<label for="resolved_no" class="radio_label">No</label><br>
				</div>
				</fieldset>
			</div>
			</div>
			</font>

		</td>

		<td width="47" style="border-style:none; border-width:medium; " height="20"></td>		
				
		<td width="318" style="border-left-style:none; border-left-width:medium; border-right-style:none; border-right-width:medium; border-top-style:none; border-top-width:medium" valign="top">
			<div  class="form_item">
			<div class="form_element cf_checkbox">
			<font face="Tahoma"><fieldset style="padding: 2">
			<legend>Follow up</legend>
			<div class="float_left">
				<font size="3">
				<input value="RS" class="radio validate-one-required" id="RS" name="RS" type="checkbox"></font>
				<label for="RS" class="check_label">RS</label>
			<br>
				<font size="3">
				<input value="Agent" class="radio" id="Agent" name="Agent" type="checkbox"></font>
				<label for="Agent" class="check_label">Agent</label>
			<br>
				<font size="3">
				<input value="OBT" class="radio" id="OBT" name="OBT" type="checkbox"></font>
				<label for="OBT" class="check_label">OBT</label>
			</div>
			</fieldset>
			</div>
			</div>
			<div class="clear"></div></font>
		</td>

	</tr>

	<tr>
		<td colspan="3"> </td>
	</tr>

	<tr>
		<td colspan="3">
		<p align="center">
		<font size="3" face="Tahoma">
		<input value="Submit" name="undefined" type="submit"><input value="Reset" type="reset"></font><p align="center">
	</td>
	</tr>

</table>

GreyHead 20 Feb, 2009
Hi fmejia,

You don't say what isn't working??? Is it all of the validation? If so then you probably have a JavaScript conflict on your page.

If it is just the 'validate-one-required' groups then I suspect that the problem is your <font></font> tags that wrap the input. Try deleting these and using css styling to set the font-size. The 'validate-one-required' should also go in the last input in the group. This is a sensitive validate method as it relies on the group of inputs sharing a common parent div. I have posted somewhere here a custom validator that is more flexible.

Bob
fmejia 20 Feb, 2009
Hi, thank you for your response GreyHead, the whole validation is not working, but I found that if remove the dropdow that contains the javascript it works in the other textboxes... I honestly have no idea of how to find the javascript error... can you give me a hand on that? I took the code from another post in your forum.
GreyHead 20 Feb, 2009
Hi fmejia,

[sendfb][/sendfb]
Bob
fmejia 20 Feb, 2009
here you go.. thank you again ... and sorry for all the troubles 😶
GreyHead 21 Feb, 2009
Hi femjia,

OK ChronoForms uses the $rows variable to set up the JavaScript correctly, if you also use it in your form then the JavaScript is broken. The second time we've seen this recently.

To fix it change the name of the db result variable in your Form HTML from $rows to $rows2
<div class="form_item">
    <div class="form_element cf_dropdown">
<?php
     $db =& JFactory::getDBO();
    $query = "
        SELECT name
        FROM `jos_agents`";
    $db->setQuery($query);
    $rows2 = $db->loadResultArray();
?>
    <font size="3">
            <select name="agent name"  onFocus="select one" >
<?php
        foreach ($rows2 as $row) {
            echo "<option value='$row'>$row</option>";
        }
?>
            </select></font>
            <font color="#FF0000">*</font>
        </div>
    </div>
    <div class="clear">
</div>

Bob
fmejia 26 Feb, 2009
thank you for that Bob.. it worked like a charm...
This topic is locked and no more replies can be posted.