"David Dorward" <do*****@yahoo.com> wrote in message
news:bn*******************@news.demon.co.uk...
Randell D. wrote:
I am working on a contact db using PHP and MySQL. My results so far
outputs a slimed down version of records to the browser. I would like
to implement a method whereby the user can click on a text link which will
then show the full record. I don't want to have hyperlinks with values
incorporated in the link (thus, I don't want to have
http://www.example.com?abc=1234) - I prefer to use a POST method
Why? You aren't changing anything on the server, so this is what GET is
designed for. Aside from being easier to deal with, it will allow people
to bookmark specific entries.
thus what I would like to do is have my output
listed inside a form. Each record would have unique hidden form value
using either a <INPUT TEXT> or <INPUT CHECKBOX>.
Why not using type="hidden"? That's designed for hidden inputs?
Each record would have a hyperlink so that when the hyperlink is
pressed, its respective unique record ID is noted, then the form submitted.
Great. So you are depending on JavaScript. This is not a good idea. The
most important thing to learn about JavaScript, is when not to use it.
http://tom.me.uk/scripting/submit.asp
Breaking my problem down a bit... I know I can have an onClick event in
my <A HREF> tag... But how can I have it set a value in a hidden box, and
then post the form?
It sounds like you would be better off having multiple forms, then trying
to edit one form based on the user selection.
--
David Dorward http://dorward.me.uk/
First off... I did mean to refer to a HIDDEN tag - the words didn't come out
the way I anticipated - my fault - sorry for being unclear...
Anyway... Your proposed solution though: I had thought of something like
that (though I have to admit, the CSS idea was new to me and a nice touch) -
but the solution doesn't meet my problem entirely... I would prefer to have
a numeric value passed (the record ID) as opposed to the the value of the
submit button... Thus if I were to have something like a hidden field, a
hyperlink around the persons name, address and other contact details which,
when clicked, passed a record id (numeric value) to the hidden field, and
then submitted the form... that is more preferable.
I've read the link you supplied - It briefly details incorrect usages and
summarises it with "all are very poor usage of the A element". In my
ignorance, I would beg to differ (I'm not looking to get flamed but am open
to being educated through this newsgroup).
Why else do the A tag have the onClick feature? I know that the A tag is for
navigational purposes, but the onClick feature allows one extra
functionality...
Most modern day graphical browsers have javascript - It helps reduce the
load on the server and share some of the processing with the client. If
users are to disable javascript, then they disable functionality and are
unlikely to see something any more informative then the equivalent of junk
mail that would come through the door (ie fixed/static and less
interactive). Putting it bluntly, one doesn't get something for nothing in
this world - Even if its just free (as in beer) - folk always get something,
be it a laugh or a smile (ie happiness), information, goods or cash for the
bank...
Roughly speaking one could compare javascript to whistles and bells, music
and lights in a bricks and mortar business. If given the choice of two
stores selling the same goods on the same street, I'd be more likely to
enter the brighter, colourful and more welcoming one then the grey bricked
1950s paint job dimly lit uuncomfortably cold looking building...
While I do intend to design my pages to have a static (non javascript)
navigation on them, I aim to place less than 10% of my resources in this way
as if they (the client/viewers) are not interested in helping me help them
then they can spend extra time navigating elsewhere to find their info... I
know its crude - but I aim to create an application online (small time
application service provider) and I have 18months experience identifying my
market... During this time I analysed log files and discovered less than 2%
(of my likely market) had javascript disabled - some months went by where
less than one tenth of 1% were non-javascript browsers.
So... again... I do like your CSS solution - kudos for that and its
something I'm sure I will refer to later - but for now, I'd prefer to have a
clickable hyperlink that writes a numeric value in to a hidden field and
then submits the form...
Can you help me there?
Cheers
Randell D.