Click to See Complete Forum and Search --> : RollOver Java Buttons


dave
12-29-2002, 04:32 AM
Hello, Can someone tell me why this does NOT work (but MO works ok):

<a href="javascript:window.document.ThisForm.submit()" OnClick="CheckCardNumber(this.form)"
onmouseover="chkVer('go4','but4'); window.status='Check Credit Card Details'; return true"
onmouseout="chkVer('go4','but3')">
<IMG NAME="go4" width=184 height=21 border=0 alt="Check Card" SRC ="check_card1.gif"></A>

and this button does:

<input type="button" NAME="ThisForm" value="Check Card" OnClick="CheckCardNumber(this.form)">

Any help would be greatly appreciated.

....... Dave

dave
12-29-2002, 11:46 AM
Hello, The way I see it, there seems to be a syntax error in the Code that does not work. For example another(below) puts a Text box alongside the button that submits the form and changes the MO of the button along side. When the text box is clicked,in IE, everything works.

ADDS AN EXTRA TEXT BOX------
<INPUT type="javascript:window.document.ThisForm.submit();" OnClick="CheckCardNumber(this.form)"
onmouseover="chkVer('go3','but4'); window.status='Check Card'; return true"
onmouseout="chkVer('go3','but3')">
<IMG NAME="go3" width=184 height=21 border=0 alt="Check Card" SRC ="check_card1.gif">

Also on another Form this works fine:

WORKS--------
<a href="javascript:window.document.billform.submit()"
onmouseover="chkVer('go5','but6'); window.status='Submit'; return true"
onmouseout="chkVer('go5','but5')" >
<IMG NAME = "go5" width=75 height=20 border=0 alt="Click Only Once" SRC ="submit1.gif"></A></DIV>

It may have something to do with: .submit();" OnClick="CheckCardNumber(this.form)"

.submit();" may not be right.

I have tried lots of combinations. Thanks,

......... Dave

dave
01-02-2003, 03:30 PM
Hello, This is basically what I want to do. The Code below invokes a Script to check an input entered into a Form..., and it works

<input type="button" NAME="ThisForm" value="Check Card" OnClick="CheckCardNumber(this.form)">

I want to use MO graphics rather than a grey button. This is what I tried (among other combinations), but it gives an error. The MO part works fine.

<a href="javascript:window.document.ThisForm.submit()" OnClick="CheckCardNumber(this.form)"
onmouseover="chkVer('go4','but4'); window.status='Check Credit Card Details'; return true"
onmouseout="chkVer('go4','but3')">
<IMG NAME="go4" width=184 height=21 border=0 alt="Check Card" SRC ="check_card1.gif"></A>

What is the syntax required to produce the same result as the gray button Code above. It has to be something simple -:).

Any help would be greatly appreciated.

....... Dave

PS: Submitting a CGI Form is fine with:
<a href="javascript:window.document.billform.submit()"
onmouseover="chkVer('go5','but6'); window.status='Submit'; return true"
onmouseout="chkVer('go5','but5')" >
<IMG NAME = "go5" width=75 height=20 border=0 alt="Click Only Once" SRC ="submit1.gif"></A></DIV>

swon
01-02-2003, 03:42 PM
If I understand you, you need a image-button:

<input type="image" src="images/yourimage.jpg">

dave
01-03-2003, 07:16 AM
Hello, The grey button does work

<input type="button" NAME="ThisForm" value="Check Card" OnClick="CheckCardNumber(this.form)">

The above works fine... and below this works after a fashon -:)

<INPUT type="radio" NAME="ThisForm" OnClick="CheckCardNumber(this.form)"
onmouseover="chkVer('go3','but4'); window.status='Check Card'; return true"
onmouseout="chkVer('go3','but3')">
<IMG NAME="go3" width=184 height=21 border=0 alt="Check Card" SRC ="check_card1.gif">

But the RollOver Imiges are alongside the Radio button and work... The same thing happens if I replace “radio” with “image”... an eppty image box appears with the RollOver images beside.

All other RollOvers work fine: Back - Submit CGI scripts - Close Window etc. But not this one -:)
Thanks
............ Dave

dave
01-04-2003, 06:09 AM
Hello, The error message appears in the “Status Bar” at the bottom of the page in MSIE 6 and reads “Error on page”.

When using “Inage” clicking on the blank image works, and even changes the image within the real image alongside. (which do nothing when clicked, and there is no MO when over the real graphic)

I think that it has to ne something like this:

<a href="javascript:window.document.ThisForm.submit()" OnClick="CheckCardNumber(this.form)"
onmouseover="chkVer('go4','but4'); window.status='Check Credit Card Details'; return true"
onmouseout="chkVer('go4','but3')">
<IMG NAME="go4" width=184 height=21 border=0 alt="Check Card" SRC ="check_card1.gif"></A>

MO works, but clicking on the graphic gives nothing but the error message “Error on page”. (The CGI form etc. works fine with that syntax)

Is there a better way to check for errors in this situation. Thanks.

dave
01-04-2003, 01:59 PM
Hello, Here is the error message:

Line: 1
Char: 1
Error: ‘window.document.ThisForm’ is null or not an object
Code: 0
URL: file://C:\payform.html

Does this help.

dave
01-05-2003, 03:33 PM
Here is the form tag: <form name="ThisForm"> and don’t forget that this Code below works:

<input type="button" NAME="ThisForm" value="Check Card" OnClick="CheckCardNumber(this.form)">

It has to be syntax.