English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I probably don't see the obvious...
My code: (PhP), in
echo ("

\r\n");
echo (" onMousedown=\"document.basket.src='pics/basketdown.gif'; return false;\"
onMouseup=\"document.basket.src='pics/basketin.gif'; return false;\"
onClick='javascript: jsorder()'>");
echo ("");
echo ("
\r\n");

function jsorder()
{
document.getElementById
('frameorder') . submit()
// no spaces, just for YA trimmer!
}

---
Always returns "object does not support this property or method".
Mousedown works (change image). Mouseup works (reet image). onclick does not...
I placed the input button to check: works...
Checked with:
document.write("id: "+document.getElementById('frameorder').id);
--> displays the Id of the form.
Tested on w3shools: works. Copied from w3shools. Does not work!
Any idea?

2007-08-18 00:18:08 · 3 answers · asked by just "JR" 7 in Computers & Internet Programming & Design

3 answers

The problem is that the tag is not a valid form input.
There is an image form input which will do exactly what you want because image form inputs are submit buttons by default.

So just change

echo(" onMousedown=\" document.basket.src=' pics/basketdown.gif' return false;\"
onMouseup=\" document.basket.src=' pics/basketin.gif' return false;\"
onClick='javascript: jsorder()'>");

to

echo(" onMousedown=\" document.basket.src=' pics/basketdown.gif' return false;\"
onMouseup=\" document.basket.src=' pics/basketin.gif' return false;\">");

and now you don't even need the javascript because the input image is already a submit button by default so remove that.
Also since the image is a submit button, you now have 2 methods of submitting so maybe the button isn't needed.

2007-08-18 01:13:48 · answer #1 · answered by E.M.Bed 5 · 0 1

your form needs a name field



Your javascript submit should be in the style:

document.thisform.submit();

It works. I use it all the time.

2007-08-18 01:40:39 · answer #2 · answered by Anonymous · 1 0

This sounds like it is a problem with your computers internal settings. It could simply be however a more common problem with your Java Applet

2007-08-18 00:26:54 · answer #3 · answered by Anonymous · 0 1

fedest.com, questions and answers