Forum Moderators: open

Message Too Old, No Replies

Help in resizing a submit button in DW please.

Help in resizing a submit button in DW please.

         

midi25

9:49 pm on Jul 15, 2002 (gmt 0)

10+ Year Member



Hi i have put in a Submit button from the forms section of DW. Only problem is the button is a bit too large on my page. I would like to resize this if possible. Is there a way i can resize this somehow. Or get a identical button but in different sizes. Thanks

Hawkgirl

10:04 pm on Jul 15, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You mean a submit button like this:

<INPUT type=submit value="Submit">

AFAIK, the button size is dependent on the value. Value="Submit" will be a shorter button than Value="Submit This Information Now!"

rewboss

10:16 pm on Jul 15, 2002 (gmt 0)

10+ Year Member



You can use a button of type image. This works just like a normal submit button, except for two things:

1. Instead of a normal button, it displays the specified image.

2. The coordinates of the mouse are sent with the form, so you can use it as a sort of server-side image map (which you have to implement yourself).

Hawkgirl

10:34 pm on Jul 15, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Right ... like:

<input type="image" border="0" name="whatever" value="submit" src="src.jpg" width="30" height="20">

moonbiter

11:52 pm on Jul 15, 2002 (gmt 0)

10+ Year Member



<input type="submit" value="Submit" style="width: 100px; height: 100px;" />

rewboss

7:45 am on Jul 16, 2002 (gmt 0)

10+ Year Member



<input type="image" src="buttonimage.gif" />

That's all you need. You can also supply name and value, these will just be submitted along with the form and x and y coordinates (you might have several submit buttons on your form and need to know which one was used).

An input element of type "image" is always a submit button.

BlobFisk

11:29 am on Jul 16, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Also, just to mention it, if you are using an image outside the <form> tags (will work just as well withing the form tag), you can use:


onClick="document.FORM_NAME_HERE.submit()"

moonbiter

1:47 pm on Jul 16, 2002 (gmt 0)

10+ Year Member



Just to mention it now that it's been mentioned, you can define this event on just about any element in modern browsers, (although it is not a good idea to do so).

So you can do:

<p onclick="document.FORM_NAME_HERE.submit()">This can submit stuff</p>

too.

midi25

3:53 pm on Jul 16, 2002 (gmt 0)

10+ Year Member



Hi i have come across another problem. It works fine if i put my image inside my form. But when i put my image in a layer inside the form and positon it the submit function no longer works. How can i get around this. please help thanks

BlobFisk

4:06 pm on Jul 16, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Midi25:

Try using the image normally (ie as an <img.. > ) and put an anchor in front of it:


<a href="javascript:void(0);" onClick="document.YOUR_FORM_NAME_HERE.submit()" title="xxx"><IMG....></a>

HTH

midi25

4:36 pm on Jul 16, 2002 (gmt 0)

10+ Year Member



how can i simply do this :

<input type="image" value="Submit" img src="submit.gif"

now this works fine when put in form. but i want to postion it 10px left and 99px top how can i do that in html of css.

thanks

rewboss

8:51 pm on Jul 16, 2002 (gmt 0)

10+ Year Member



You say "layers" -- does this imply Netscape 4 <layer>s? As far as I know, a layer has its own document property, which means that a layer's content is not in the same document that the layer itself is. That would mean that a Submit button inside a layer inside a form is not part of the form... I think.

I think you might have to see if you can position it without layers:

position: relative;
top: 99px; left: 10px;

moonbiter

3:44 am on Jul 17, 2002 (gmt 0)

10+ Year Member



<input type="image" value="Submit" img src="submit.gif"
now this works fine when put in form. but i want to postion it 10px left and 99px top how can i do that in html of css.

<input type="image" value="submit" src="submit.gif" style="position: absolute; top: 99px; left: 10px;" />

joshie76

11:41 am on Jul 17, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Also, just to mention it, if you are using an image outside the <form> tags (will work just as well withing the form tag), you can use:

Note that, in Netscape 4, any form element (input tags etc) will not render at all if they are not within form tags.

J