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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dumb question... Form attrib: default VS. value

Status
Not open for further replies.

okiiyama

IS-IT--Management
Jan 3, 2003
269
US
Ive got a form that resubmits to the same page with some hidden fields, and Im wondering if using default is like saying "if a value wasn't passed through, it would default, but if there is a value for that field it would use that instead of the default."

What Im doing is pulling data from a query into an html table and want it to be sortable by its columns. So then, the query reexecutes each time a column header is clicked on, so...I need to keep track of the current column to sort by, previous column that was sorted by, and the direction of the sort.

make sense?

Thanks.
 
the best way to keep track of column sorting, in my opinion, is the utilization of the querystring.

in other words, your url might look like:

[tt]www.site.com/index.php?sortcol=1&sortdir=asc[/tt]

and then parse the query string and do what you need to do.

*cLFlaVA
----------------------------
[tt]0101 is binary code for "supreme programmer of omnipotent power"[/tt] - adam0101
[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
I had been doing it like that for similar pages, but this page already has a lot of form fields that would need to be resubmitted, and with my additional parameters for the query sort would make the url huge. I don't care that much, but I may have to go that route, but I thought I would at least put forth an effort to see if I could do it this way.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top