What am I doing wrong??

John Pollock's picture

He has: 628 posts

Joined: Mar 1999

Have you tried a linked image? That should work with NS and IE to call a function:

<A HREF="javascript:function()"><IMG SRC="url" border="0"></A>

Jack Michaelson's picture

He has: 1,733 posts

Joined: Dec 1999

Hi everyone,

I created a site for a friend of mine, but there's a little problem.
There's a textarea where visitors can type comments. A javascript checks wether he uses NS or IE. If he uses NS the form will be sent
with:
<input type=button onclick="document.commentform.submit()">
If he uses IE it will be sent with:
<img src=whatever onclick="document.commentform.submit()">
But somehow it does not send anything.
Can someone tell me why??
The url is:

right here

When you're on the site, click "DJ Bookings" below, where you'll find the form.

Thanx in advance,

Jack

PS. When you search through the site, you might hop into a picture of me

[This message has been edited by Jack Michaelson (edited 09 March 2000).]

Shakespeare: onclick || !(onclick)

They have: 117 posts

Joined: Feb 2000

Jack,

I'm not exactly sure why what you're doing does not work, but I can tell you how I do it and it works fine.

I have a form which users can enter comments on and submit them. In my <form> tag I simply have the following tag:

<input type="submit" value="submit">
(obviously you can use anything you want in the value parm, such as SEND rather than SUBMIT if you want)

This works fine in both NS and IE. Hope this helps.

Bob

Jack Michaelson's picture

He has: 1,733 posts

Joined: Dec 1999

Thanx Bob,

I know what you're talking about.
I want the IE-users to have an image that submits the form. Since NS does not support onclick with images, it's necessary that NS-users just see the <input type="submit">
Maybe this is why it is not functioning, although I do not understand why.
Who does?

Jack

Shakespeare: onclick || !(onclick)

Jack Michaelson's picture

He has: 1,733 posts

Joined: Dec 1999

Thanks John.

You're the best.

Jack

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.