submit problem !!!! 
Author Message
 submit problem !!!!

I'm trying to operate a javascript function thrue "href"  , the purpose of
the function is to validate and proceed a submit operation to the form , but
i get errors  while using this line - getting inside the validateing
function ( not really recognize "this.form" as an form object ) :

<div id="Layer9" style="position:absolute; left:595px; top:316px;
width:97px; height:54px; z-index:10"><a
href="javascript:validating(this.form) onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('Image23','','Images/Passubmit_over.gif',1)"><img
name="Image23" border="0" src="Images/Passubmit_1.gif" width="99"
height="107"></a></div>

but when i'm using the submit button everthing is ok :

<div id="Layer9" style="position:absolute; left:620px; top:340px;
width:97px; height:54px; z-index:10"><input type="button" Value="Submit"
onclick="validatePersonalInfo(this.form)"></div>

but this is a regular button ( i need an image button )

Anyway i need to operate the validating function as a image button ( or href
with image ....)

I will be thankfull for ane kind of help

regards
moris



Thu, 22 May 2003 03:00:00 GMT  
 submit problem !!!!
Is there some reason you can't use <input type=image> to submit your form?

As to your "this.form" problem, it's because "this" refers to the object
that the code is attached to. For the submit button's onclick handler, it's
the submit button, for the href, it's the anchor. The submit button object
has a form property that points to its containing form, so you can use
"this.form" to access the form that the button is in. The anchor object (1)
doesn't have a form property, and (2) isn't contained in a form. You need to
reference the document's forms collection to get a reference to the form.

  validating(document.forms['YourFormNameHere'])

=-=-=
Steve
-=-=-


Quote:
> I'm trying to operate a javascript function thrue "href"  , the purpose of
> the function is to validate and proceed a submit operation to the form ,
but
> i get errors  while using this line - getting inside the validateing
> function ( not really recognize "this.form" as an form object ) :

> <div id="Layer9" style="position:absolute; left:595px; top:316px;
> width:97px; height:54px; z-index:10"><a
> href="javascript:validating(this.form) onMouseOut="MM_swapImgRestore()"

onMouseOver="MM_swapImage('Image23','','Images/Passubmit_over.gif',1)"><img
Quote:
> name="Image23" border="0" src="Images/Passubmit_1.gif" width="99"
> height="107"></a></div>

> but when i'm using the submit button everthing is ok :

> <div id="Layer9" style="position:absolute; left:620px; top:340px;
> width:97px; height:54px; z-index:10"><input type="button" Value="Submit"
> onclick="validatePersonalInfo(this.form)"></div>

> but this is a regular button ( i need an image button )

> Anyway i need to operate the validating function as a image button ( or
href
> with image ....)

> I will be thankfull for ane kind of help

> regards
> moris




Thu, 22 May 2003 03:00:00 GMT  
 submit problem !!!!
Looks like a missing " after javascript:validating(this.form) =

<div id="Layer9" style="position:absolute; left:595px; top:316px;
width:97px; height:54px; z-index:10"><a
href="javascript:validating(this.form)" onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('Image23','','Images/Passubmit_over.gif',1)"><img
name="Image23" border="0" src="Images/Passubmit_1.gif" width="99"
height="107"></a></div>

--
--
.:*~*:._.:*~*:._.:*~*:.
   Merry Christmas
Paul Bargewell
Technical Director
TCPIP Limited
Tel : +44(0)121 622 5000
Tel : +44(0)121 622 5159

Quote:
> I'm trying to operate a javascript function thrue "href"  , the purpose of
> the function is to validate and proceed a submit operation to the form ,
but
> i get errors  while using this line - getting inside the validateing
> function ( not really recognize "this.form" as an form object ) :

> <div id="Layer9" style="position:absolute; left:595px; top:316px;
> width:97px; height:54px; z-index:10"><a
> href="javascript:validating(this.form) onMouseOut="MM_swapImgRestore()"

onMouseOver="MM_swapImage('Image23','','Images/Passubmit_over.gif',1)"><img
Quote:
> name="Image23" border="0" src="Images/Passubmit_1.gif" width="99"
> height="107"></a></div>

> but when i'm using the submit button everthing is ok :

> <div id="Layer9" style="position:absolute; left:620px; top:340px;
> width:97px; height:54px; z-index:10"><input type="button" Value="Submit"
> onclick="validatePersonalInfo(this.form)"></div>

> but this is a regular button ( i need an image button )

> Anyway i need to operate the validating function as a image button ( or
href
> with image ....)

> I will be thankfull for ane kind of help

> regards
> moris




Sun, 25 May 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Form submitting problem

2. frame + submit problem

3. multiple form submit problem

4. Please help: Problem submitting form

5. Problem with post submit in another Frame in Netscape

6. problem submitting form from a function

7. submit form in child window to parent - IE4 problem

8. Problem with submit()

9. 'submit' button problem

10. submit() Method problems

11. problems with enter key in submit button

12. two submit buttons problem

 

 
Powered by phpBB® Forum Software