Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Submit buttons and text boxes 2

Status
Not open for further replies.

gwar2k1

Programmer
Apr 17, 2003
387
GB
I want to change the appearance of my said items from their usual incarnations.

I want an image >as< a submit button (not a background)
I want the text boxes like the ones on Tek-Tips

Any one know how?

~*Gwar3k1*~
&quot;To the pressure, everything's just like: an illusion. I'll be losing you before long...&quot;
 
for the submit button

<input type=&quot;image&quot; src=&quot;submit.gif&quot; name=&quot;Submit&quot; value=&quot;Submit&quot;>

and to format your inputs make a style

input {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
font-weight: bold;
color: #330066;
background-color: #FFFFFF;
border: 1px solid #999999;
width: 100px;
}

you can always tweak or change or add to the styles. but that is just a quick example!

[Hammer]
Nike Failed Slogans -- &quot;Just Don't Do It!&quot;
 
Thanks!

~*Gwar3k1*~
&quot;To the pressure, everything's just like: an illusion. I'll be losing you before long...&quot;
 
The submit button doesnt subit any more...

I changed input type=&quot;submit&quot; to &quot;image&quot; which works but wont submit =
This is my line:
<input type=&quot;image&quot; src=&quot;sub.png&quot; name=&quot;login&quot; class=&quot;mainoption&quot; value=&quot;submit&quot; &quot; />

~*Gwar3k1*~
&quot;To the pressure, everything's just like: an illusion. I'll be losing you before long...&quot;
 
take out that &quot;/&quot; at the end

[Hammer]
Nike Failed Slogans -- &quot;Just Don't Do It!&quot;
 
Nope =\ I also tried removing the xs &quot; too.

<input type=&quot;password&quot; name=&quot;password&quot; size=&quot;25&quot; maxlength=&quot;25&quot; /><input type=&quot;hidden&quot; name=&quot;sid&quot; value=&quot;fc081da493138a0abee5d98046a322e5&quot; /><input type=&quot;hidden&quot; name=&quot;redirect&quot; value=&quot;&quot; /><input type=&quot;image&quot; src=&quot;images/sub.png&quot; name=&quot;login&quot; class=&quot;mainoption&quot; value=&quot;submit&quot; &quot; />

That goes in a cell in a table. Its clearly not my code, its a phpBB that I'm trying to mod.

~*Gwar3k1*~
&quot;To the pressure, everything's just like: an illusion. I'll be losing you before long...&quot;
 
paste the whole form code and ill get back

[Hammer]
Nike Failed Slogans -- &quot;Just Don't Do It!&quot;
 
There was a long discussion of this issue at thread215-552507 .

Basicly the problem is that when you click a button like
[tt]
<input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Go&quot; />
[/tt]
The form passes a value to the script of submit=Go. If you replace it with
[tt]
<input type=&quot;image&quot; src=&quot;mypic.gif&quot; name=&quot;submit&quot; value=&quot;Go&quot; />
[/tt]
You DON'T get a submit=Go pair, you get submit.x=12&submit.y=34 instead (where 12,34 is the position on the image where you clicked). Try changing you form's [tt]action[/tt] from &quot;post&quot; to &quot;get&quot; and you'll see what I mean. Note that the &quot;value&quot; attribute of image inputs is ignored.

If your form only had one submit button, you can work around this problem by adding a hidden input to your form like this:
[tt]
<input type=&quot;hidden&quot; name=&quot;submit&quot; value=&quot;Go&quot; />
<input type=&quot;image&quot; src=&quot;mypic.gif&quot; name=&quot;submit2&quot; />
[/tt]

-- Chris Hunt
Extra Connections Ltd

The real world's OK for a visit, but you wouldn't want to LIVE there!
 
<form action=&quot;forum/login.php?sid=fc081da493138a0abee5d98046a322e5&quot; method=&quot;post&quot; target=&quot;_top&quot;>
<table bgcolor=&quot;#C0C0C0&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td width=&quot;100%&quot;>
<font face=&quot;Arial&quot; size=&quot;1&quot;>
User name:<br>
<input type=&quot;text&quot; name=&quot;username&quot; size=&quot;25&quot; maxlength=&quot;40&quot; value=&quot;&quot; />
</font>
</td>
</tr>
<tr>
<td width=&quot;100%&quot;>
<font face=&quot;Arial&quot; size=&quot;1&quot;>
Password:<br>
<input type=&quot;password&quot; name=&quot;password&quot; size=&quot;25&quot; maxlength=&quot;25&quot; /><input type=&quot;hidden&quot; name=&quot;sid&quot; value=&quot;fc081da493138a0abee5d98046a322e5&quot; /><input type=&quot;hidden&quot; name=&quot;redirect&quot; value=&quot;&quot; /><input type=&quot;submit&quot; name=&quot;login&quot; class=&quot;mainoption&quot; value=&quot;&quot; style=&quot;background-image: url('../../Documents%20and%20Settings/Gwar3k1/Desktop/trunks/images/tocps2.png'); padding: 0&quot; />
</font>
</td>
</tr>
<tr>
<td width=&quot;100%&quot;>
<a href=&quot;forum/profile.php?mode=register&quot;><font face=&quot;Arial&quot; size=&quot;1&quot;>Register</font></a>
</td>
</tr>
</table>

</form>

---------------------------------

Thanks chris... i didnt get most of it, but Im gonna try that last lil bit.

~*Gwar3k1*~
&quot;To the pressure, everything's just like: an illusion. I'll be losing you before long...&quot;
 
Nope that didnt work =(

~*Gwar3k1*~
&quot;To the pressure, everything's just like: an illusion. I'll be losing you before long...&quot;
 
Sorry that was the old script, I was playing around with a random background image before I came here ;)

<input type=&quot;submit&quot; name=&quot;login&quot; class=&quot;mainoption&quot; value=&quot;&quot; style=&quot;background-image: url('../../Documents%20and%20Settings/Gwar3k1/Desktop/trunks/images/tocps2.png'); padding: 0&quot; />

should be

<input type=&quot;image&quot; src=&quot;images/sub.png&quot; name=&quot;login&quot; class=&quot;mainoption&quot; value=&quot;&quot; />


~*Gwar3k1*~
&quot;To the pressure, everything's just like: an illusion. I'll be losing you before long...&quot;
 
Change
[tt]
<form action=&quot;forum/login.php?sid=fc081da493138a0abee5d98046a322e5&quot; method=&quot;post&quot; target=&quot;_top&quot;>
[/tt]
to
[tt]
<form action=&quot;forum/login.php&quot; method=&quot;get&quot; target=&quot;_top&quot;>
[/tt]
while you're debugging this form. It won't fix your problem, but it will let you see what values are being sent from the form to the server cos they appear in the URL. Compare the values you get with the working version (with submit button) with the non-working (image) version - it may give you a clue as to what's going wrong.

-- Chris Hunt
Extra Connections Ltd

The real world's OK for a visit, but you wouldn't want to LIVE there!
 
Should i clear all the other sid's then?


~*Gwar3k1*~
&quot;To the pressure, everything's just like: an illusion. I'll be losing you before long...&quot;
 
wont debug it my ass! oh man you're great! (it works) hehe

Thanx all!

~*Gwar3k1*~
&quot;To the pressure, everything's just like: an illusion. I'll be losing you before long...&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top