473,407 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

how is submit button appearance changed?

Hi,

Currently designing/building my first class/template driven site.

Inside a PHP form a list of article titles are displayed along with the
first two lines of the article. When the user clicks on the article title
the form with the list of article titles is replaced with the full text of
the article selected.

Since the article ID for the article title selected determines which article
will be displayed it would seems that if each title displayed (on the
article title list page) was actually a submit button. Of course I don't
want a list of gray submit boxes with titles lumbering down the page.

What I'd like to know is:

First, is it possible to assign a variable to a submit button. It seems like
it would be, but if someone has found a reason for not doing so I'd
appreciate hearing it.

Second, how do I change the image of the submit button so it appears as a
link (without the underline, of course). I've found a couple of tutorials in
regards to this issue, but they all had major typos and so far have not
gotten any of them to work. Any suggestions in this area will be of an
immense help.

Any suggestions or advice is greatly appreciated.

Richard
Jul 17 '05 #1
2 3225
Richard B. wrote:
Hi,

Currently designing/building my first class/template driven site.

Inside a PHP form a list of article titles are displayed along with the
first two lines of the article. When the user clicks on the article title
the form with the list of article titles is replaced with the full text of
the article selected.

Since the article ID for the article title selected determines which article
will be displayed it would seems that if each title displayed (on the
article title list page) was actually a submit button. Of course I don't
want a list of gray submit boxes with titles lumbering down the page.

What I'd like to know is:

First, is it possible to assign a variable to a submit button. It seems like
it would be, but if someone has found a reason for not doing so I'd
appreciate hearing it.

Second, how do I change the image of the submit button so it appears as a
link (without the underline, of course). I've found a couple of tutorials in
regards to this issue, but they all had major typos and so far have not
gotten any of them to work. Any suggestions in this area will be of an
immense help.

Any suggestions or advice is greatly appreciated.

Richard


Hi Richard,

To have a link act like a submit button do the following:

<a href="javascript:document.submit()" style="text-decoration:none">
My link
</a>

Buttons also have a variable associated with them and that is their name:

<input type="submit" name="myButton" value="Submit!">
<input type="submit" name="myButton" value="Skip">

So, in the file where you are processing the form you can use it as a
regular POST (or GET) variable:

if ($_POST["myButton"] == "Submit!")
print "hello";
else if ($_POST["myButton"] == "Skip")
print "skipping";
Jul 17 '05 #2
I noticed that Message-ID: <kc*******************@twister.socal.rr.com>
from Richard B. contained the following:
Second, how do I change the image of the submit button so it appears as a
link (without the underline, of course). I've found a couple of tutorials in
regards to this issue, but they all had major typos and so far have not
gotten any of them to work. Any suggestions in this area will be of an
immense help.


Why not make it a link, to the same page if needs be, and pass a
variable(or variables) in the URL? You can then style it with CSS how
you want.
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: lsarg | last post by:
i've been trying forever to figure out a way to use a regular text link in place of a submit button at the bottom of this. can't get it. i'm just starting to learn php, so i'm stuck. any help at...
4
by: Eric | last post by:
Hey Everyone.. I have a form that has approximately 7 text fields and 1 checkbox. Generally when this form is submitted(to itself BTW) it works fine, however, when the checkbox is only field...
4
by: Sarah | last post by:
Hi all. I have a form, and several text and image links on it that should submit the form with different actions. I prepared a simple page with just the code that's not working. PROBLEM:...
2
by: Margaret Werdermann | last post by:
Hi all: I'm having a nasty time with a particularly difficult piece of code and was hoping someone might be able to help me. I have a FormMail form that originally worked perfectly. Then, I...
2
by: Matt | last post by:
In the following code, I have 2 questions regarding submit button with image. 1) Does this code <input type="image" name="populate" src="populate.gif"> behave the same as an HTML submit button...
1
by: melanieab | last post by:
Hi again, With much help, I've finally gotten the Tab key to be recognized when a textbox is in focus, but now I'm having trouble with the up/down keys when they're focused on a custom button (on...
10
by: Perry van Kuppeveld | last post by:
Hi, I have a problem with formatting a table including text fields wich can contain up to 255 chars. I need a table with 3 columns: - First column 50 % over the with a rowspan of the total...
7
by: David T. Ashley | last post by:
Hi, For a web page, I want a SUBMIT button that commits the form data and a CANCEL button that goes to a different target (i.e. a different script). I haven't figured out how to do this,...
5
by: WestAussie | last post by:
Hello I'm new to .NET and have been working through some exercises to get a bit more fluent. I have no idea what I have done to cause command buttons to have their background appearance...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.