Print Page | Close Window

Validation with Frames?

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: General Discussion
Forum Description: General discussion and chat on any topic.
URL: https://forums.webwiz.net/forum_posts.asp?TID=913
Printed Date: 29 March 2026 at 9:19am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Validation with Frames?
Posted By: mlhopper
Subject: Validation with Frames?
Date Posted: 11 March 2003 at 7:02am

My page is set up in the following way:

outer border - with a frame (and separate page) within a smaller square in the center of the page. My form is in the center frame...but my submit button is in the outer border frame.

My question:

Is there a way to validate the form in the center frame, even though the submit button is in the border frame?

Thanks,

Melissa




Replies:
Posted By: michael
Date Posted: 11 March 2003 at 8:48am
From what I understand you have the submit button of a form in a different frame then the actual form! Is that correct? Well then there is a problem as they are actuall two different pages and you could not submit the form in the centerframe with a button in another frame. Unless I understand you completely wrong there is no way you can do what you want.


Posted By: mlhopper
Date Posted: 11 March 2003 at 9:06am

You understood right.  I didn't think it was possible either...

This thing is...I am creating a training simulator for a company's website.  Their website is set up like this - the form is in the center frame and the outer border contains the submit (continue) button and the following validation occurs:
If no name, error message appears at top of screen "Please complete name"
If no address, error message "Please complete address", etc.

I have no idea how they did this, as they have hidden a great deal of code.  I have to replicate the website to look as similar as possible, and this is why I must find out how they did this.  Any suggestions as to ways to replicate without being in frames?  I have to have the scroll bar on the right side of the center form though - which is why I thought I would have to have frames.

Thanks,

Melissa



Posted By: mlhopper
Date Posted: 11 March 2003 at 10:00am

One of the guys here figured it out and it worked...to reference the frame - put the function in the main (outer) frame...

Reference the Frame by top.frameName.FormName.radioGroupName.value......(example below)

function dslType()
{
 
 if (top.centerConfig.fm10.dslType[0].checked != true)
 {
  
  alert("Please check the correct DSL type.");
  popNotes();
  return false;
  
 }
 
 if (top.centerConfig.fm10.dslType[1].checked == true)
 {
  
  alert("Please check the correct DSL type.");
  popNotes();
  return false;
  
 } 


  if(top.centerConfig.fm2.networking[0].checked != true)
  {
     
     alert("Please select the correct radio button for Home Networking.");
     popNotes();
     return false;   
     
  }
  return true;
}

Then add the following to the form containing the Continue/Submit button...

<form name="buttons" action="01index.htm" method="get" onSubmit="return dslType(this);">

Let me know if anyone has any questions about it.

Melissa




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net