hi guys...
i have a form that submits info to the database...it works fine in ie, but was freezing in ff...originally i thought it was because my firefox has been playing up recently, but i got a friend to test on his machine and he got the same result

the page will load for maybe 3 mins, then it will show a 400 error.
i keep goin over the code and it all seems fine, plus it works perfect in internet explorer, so i dont understand what the problem could be?

Recommended Answers

All 12 Replies

how did it do with other browsers?

with other browsers it works fine

Member Avatar for diafol

When you say 400 - you mean bad request I take it.
Have you checked the urls to ensure that they aren't malformed?

Post your code.

hi...the code is written in codeigniter...so theres a model view and controller...which do you need to see?

and yes a bad request.
the form points to a function in a controller file. what would be malformed in it? how can it work in ie but not ff?
thanks

hi...the code is written in codeigniter...so theres a model view and controller...which do you need to see?

and yes a bad request.
the form points to a function in a controller file. what would be malformed in it? how can it work in ie but not ff?
thanks

post controller and view

Member Avatar for diafol

BTW - have you got <!-- html comments --> in your code?
I hit a snag with one of my phpBB sites once with a

<!--IF

This sent Firefox crazy, but no effect on everything else.

hi guys....
i have just tested this again on a different script which runs off the same database and im still getting the issue....so is it possible its a database issue?

both the scripts are the same, except i use one for testing and another for changing the css/design..they both run off the same database...i created a new form on the editing site and since then i hav the issue, so i figured it was my form....but now ive tested on the script i havent edited, and its still forever loading on any form submitted?? the only solution i can figure for that is the db??

Member Avatar for diafol

post controller and view

ditto, otherwise we're just pissing in the dark

the only problem with posting the code is that the controller function is around 700 lines long..the actual controller is around 3000 lines

im not sure if thats ok to post here?

Member Avatar for diafol

JUst show the relevant bits. No need for the whole shebang.

ok..a bit of success.....ive found out that its an issue with my multipart form, i have a file upload inside the form, but if its blank i get the forever loading, if i upload an image it works perfectly....heres the form

<form method="post" action="<?php echo site_url('project/createproduct'); ?>" name="form"  enctype="multipart/form-data">
                              <ul>
                                <li>
                                  <h5><?php echo $this->lang->line('Project Name');?> <b><span style="color:red;">*</span></b></h5>
                                  <p><?php echo $this->lang->line('Do not put a domain/URL in your project name.');?></p>
                                  <p>
                                   <input name="projectName" value="<?php echo set_value('projectName'); ?>" maxlength="50" size="50" type="text"/>
	                               <?php echo form_error('projectName'); ?>
                                  </p>
                                </li>
                                                                <li>
                                  <h5><?php echo 'Producy tags';?> <b><span style="color:red;">*</span></b></h5>
                                  <p><?php echo 'Add tags to your project. Seperate each tag with a comma.';?></p>
                                  <p>
                                   <input name="location" value="<?php echo set_value('location'); ?>" maxlength="50" size="50" type="text"/>
	                               <?php echo form_error('location'); ?>
                                  </p>
                                </li>
                                
                                
                                <li>
                                  <h5><?php echo $this->lang->line('Describe the project in detail:');?> <span style="color:red;">*</span></h5>
                                  <p><?php echo $this->lang->line('Do not post any contact info');?> ( <a href="<?php echo site_url('faq/view/20');?>"><?php echo $this->lang->line('Why?');?></a> | <a href="<?php echo site_url('page/condition'); ?>"><?php echo $this->lang->line('Review Terms');?></a> )</p>
									<p>
									  <textarea rows="10" name="description" cols="70"><?php echo set_value('description'); ?></textarea>
									   <?php echo form_error('description'); ?>
									</p>

                                </li>
								<li><h5><b><?php echo $this->lang->line('I want my project to stay open for bidding for');?>
									<select name="openDays">
									<?php for($i=1;$i<=$project_period;$i++){?>
									<option value="<?php echo $i;?>" <?php if(isset($project_period)) { if($project_period == $i) echo 'selected="selected"'; }?> ><?php echo $i;?></option>
									<?php } 
									?>
									</select>&nbsp;<?php echo $this->lang->line('days');?>
                                  </h5></b></li>
                                <li>
                                  <h5><?php echo $this->lang->line('Job Type: (Make up to 5 selections.)');?></span> <span style="color:red;">*</span></h5>
                                  
                                  <!--OPTION LIST-->
									<?php
											if(isset($groupsWithCategories) and count($groupsWithCategories)>0 )
											{
												foreach($groupsWithCategories as $groupsWithCategory)
												{
													if($groupsWithCategory['num_categories']>0)
													{				
									?>
									<p><u><?php echo $groupsWithCategory['group_name']?></u></p>
									<div id="selProgrammingOptions">
									  <table>
									  <?php $i=0;
										foreach($groupsWithCategory['categories']->result() as $category)
										{
										 if($i%3 ==0)
                							echo '<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>';
									  ?>
										
										  <td><label><input onClick="count(this.form)" name="categories[]" value="<?php echo $category->id; ?>" <?php echo set_checkbox('categories[]', $category->id); ?> type="checkbox"/><?php echo $category->category_name;  ?></label></td>
										<?php if($i%3 ==2)
											   echo '</tr>';
										   $i = $i + 1; ?>
									<?php
										} //Foreach End - Traverse Category
									?>
									 </table>
									</div>
									<?php
													}//Check For Cateogry Availability
											} //For Each Travesal - For Group
										}//If End - Check For Group Existence
									?>
									<?php echo form_error('categories[]'); ?>
								  
								 
                                  
                                </li>
								
                              </ul>
                              <div class="clsOptionalDetails">
                                <h3><span class="clsInvoice"><?php echo $this->lang->line('Optional Project Details...');?></span></h3>
                              
                              
                                <ul>
             
                             
                             
             <li>
                    <h5><?php echo 'Upload Images';?> </h5>
                    
			<select name="attachmentfile">			
 			<option value="">Choose File</option>                       
				<?php $filesize = 0; $i=0;
		                    foreach($fileInfo->result() as $fileDate)
  		                    { $i++; 
  		                    if($i%2==0)
   		                     {
  		                      $class = 'dt1 dt0';
   		                   $class2 = 'dt1';
    		                  }
    		                  else
    		                    {
    		                    $class = 'dt2 dt0';   
    		                  $class2 = 'dt2';
     		                 }
     		                  ?>  

  				<option value="<?php echo $fileDate->location; ?>"><?php echo $fileDate->original_name ; ?></option>
				  <?php }?>
				</select>    </p> 
   <h5>Upload a new attachment with the Quick uploader: </small><input class="clsSmall" type="button" onClick="myPopup2()" value="Q-Upload"></h5>                            
                                  
                               
                               </li>
                               
                               
                                  <li>
                                    <h5><?php echo $this->lang->line('Project Budget:');?> <span style="color:red;">* : Must be at least $10.</span></h5>
                                    <p><?php echo $this->lang->line('Minimum:');?>&nbsp;<span> $

                         
                                    <input name="budget_min" value="<?php echo set_value('budget_min'); ?>" size="5" type="text"/><?php echo form_error('budget_min'); ?>
                                    </span></p>
                                  
                                  </li>
								  
						  <li class="clSNoBack">
									<ul class="clsFloatedList clearfix">
									  <li class="clsPercent30">
										<input  name="is_feature" value="1" type="checkbox" <?php echo set_checkbox('is_feature', '1'); ?> onClick="check_featured(this.form)" />
										<b><?php echo $this->lang->line('Make Project');?> <a href="<?php echo site_url('/faq/view/59')?>" target="_blank"><?php echo $this->lang->line('Featured');?></a> 
										<img src="<?php echo image_url("featured2.gif");?>" width="16" border="0" height="13" alt="."/></b> </li>
									  <li class="clsPercent10"> $ <?php echo $feature_project; ?>
									
									  </li>
									  <li class="clsPercent50"><?php echo $this->lang->line('pro1');?> <a href="<?php echo site_url('/faq/view/59')?>" target="_blank"><?php echo $this->lang->line('Click here');?></a> <?php echo $this->lang->line('read');?></li>
									</ul>
									
									
									<ul class="clsFloatedList clsClearFix clsMod2">
								 	 <li class="clsPercent30">
									 <input type="checkbox" <?php echo set_checkbox('is_private', '1'); ?> name="is_private" id="is_private" value="1" onclick="check_private(this.form)" /><b> <?php echo $this->lang->line('Private Invitation'); ?> <img src="<?php echo image_url("private.png");?>" width="15" border="0" height="15" alt="private"/></b><br /> </li>
									  <li class="clsPercent10"> $ <?php echo $private_project; ?></li>
									  <li class="clsPercent50"> <p><?php echo $this->lang->line('Private Messages'); ?><br /><br /><?php echo $this->lang->line('list'); ?></p></li>
									  
									  
									   <li class="clsPercent50">
									 <?php echo $this->lang->line('private invitation list');  ?> ( <?php echo $this->lang->line('one username per line');  ?>):
									 <br />
									  <span>
									  <textarea name="private_list" id="private_listfill" rows="7" cols="30"  <?php if(set_value('is_private')!='1'){ ?> disabled="disabled" <?php } ?> ><?php echo set_value('private_list'); ?></textarea>
									  <?php echo form_error('private_list');  ?>
									  </span></li>
									  
									</ul>  		
									
									 
									
								  </li>
								  
	     <li>
                                    <h5><?php echo $this->lang->line('Attachment:');?>
                  <img src="<?php echo image_url('clip.gif'); ?>" width="15" height="13" />
									  <input name="attachment" type="file"/>
									 <small style="color:red;" ><?php echo $this->lang->line('allowed files'); ?></small>	
									  <?php 
									   $filesize = '0';
									   foreach($fileInfo->result() as $fileDate)
										 {
										   $filesize =$filesize + $fileDate->file_size;
										 } ?>	 
									  <?php echo form_error('attachment'); ?>
									  
									
                                    </h5>                    
                                   
                                    
                                    
                                    <p><small><?php echo $this->lang->line('info'); ?> <?php echo round($filesize/1024,2);?> <?php echo $this->lang->line('info1');?> <?php echo $maximum_size.' MB'; ?></small></p></li>
                                  
                             
                             									  
							    </ul>
							  </div>
							  <p>
								<input class="clsSmall" value="<?php echo $this->lang->line('Save Draft');?>" name="save_draft" type="submit" />
								<input class="clsSmall" value="<?php echo $this->lang->line('Preview');?>" name="preview_project" type="submit" onClick="javascript:return formSubmit()" />
								<input class="clsMid" value="<?php echo $this->lang->line('Submit Project');?>" name="createProject" type="submit" />	
								
                              </p>  
                              </p><p>By submitting your project or job listing you are agreeing to our terms and conditions stated here | ( <a href="<?php echo site_url('/page/condition')?>"><?php echo $this->lang->line('Review Terms');?></a> )</p>
								  
							  </form>

the file upload is at line 162

since you have noted problematic part, post only relevant part!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.