Re: Fw: [PHP-DB] Dynamic Navigation Bar
| From: | Julien Bonastre | Date: | Fri, 23 Dec 2005 16:35:18 +0000 |
| Subject: | Re: Fw: [PHP-DB] Dynamic Navigation Bar | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-40913@lists.php.net to get a copy of this message | ||
yes its definitely quite an interesting piece....
I can't comment on its origins either, but I'm sure even before it was placed into practice you could always use the event handling routines of the HTML anchor element
which of course would be:
ONCLICK="myFunction(parameters,...); return true;"
and/or the many others: ONMOUSEDOWN, ONMOUSEUP, ONKEYPRESS, etc etc
http://www.w3.org/TR/REC-html40/sgml/dtd.html#events
Anyway, enjoy ;-)
---oOo--- Allowing users to execute CGI scripts in any directory should only be considered if: ... a.. You have no users, and nobody ever visits your server. ... Extracted Quote: Security Tips - Apache HTTP Server ---oOo--- ------oOo---------------oOo------ Julien Bonastre [The_RadiX] The-Spectrum Network CEO ABN: 64 235 749 494 julien@the-spectrum.org www.the-spectrum.org ------oOo---------------oOo------ ----- Original Message ----- From: <dpgirago@mdanderson.org>
To: <php-db@lists.php.net>; <julien@the-spectrum.org>
Sent: Saturday, December 24, 2005 1:03 AM
Subject: Re: Fw: [PHP-DB] Dynamic Navigation Bar
Thanks for weighing in on the question, Julien. It's an intranet application, and I have some influence with the users' browser settings, so I used Javascript. I have to admit though that I was unaware you could pass a function from an anchor href tag (<a href="javascipt:myFunction(paramenters,...);">link</a>, for those similarly in the dark). Dynamically creating the links with their associated offset for use with MySQL's "limit" syntax works very well. I'm curious if anybody knows how long Javascript has supported this syntax? I found example scripts using it beginning in chapter 15 of Danny Goodman's "JavaScript Bible" (5th Edition) 2004, so I'm guessing it's part of the Document Object Model specification, but I didn't explore it's origins. Thanks Bastien and Julien. DavidFrom: "Julien Bonastre" <julien@the-spectrum.org> To: "Bastien Koert" <bastien_k@hotmail.com> Sent: Friday, December 23, 2005 11:01 PM Subject: Re: [PHP-DB] Dynamic Navigation BarI would suggest using the GET method.. Unless you have some reason you don't want the data passed via GET.. In which case I suggest just storing all that in a session.. So for example, I wouldn't want to pass a big ugly html-encoded query string via the GET URI, as it would look awful Instead, set a session variable holding that query and any relateddetailsyou are also processing [ie user selected sorting of results [ascending/descending] etc, fields to sort by, whatever options you have]and just pass a 'pg' value via get such as ./search.php?pg=2 or something.. As as alternative to the javascript form POSTing method.. Its up to you, I'm just providing an alternative to using Javascriptwhichas someone else outlined is CLIENT side, hence you are relying on correctoperation by the browser for it to work.. I don't like relying on the clients browser, I like relying on my code.. Enjoy ---oOo--- Allowing users to execute CGI scripts in any directory should only be considered if: ... a.. You have no users, and nobody ever visits your server. ... Extracted Quote: Security Tips - Apache HTTP Server ---oOo--- ------oOo---------------oOo------ Julien Bonastre [The_RadiX] The-Spectrum Network CEO ABN: 64 235 749 494 julien@the-spectrum.org www.the-spectrum.org ------oOo---------------oOo------ ----- Original Message ----- From: "Bastien Koert" <bastien_k@hotmail.com> To: <dpgirago@mdanderson.org>; <php-db@lists.php.net> Sent: Friday, December 23, 2005 1:39 AM Subject: RE: [PHP-DB] Dynamic Navigation Barhowjavascript BastienFrom: dpgirago@mdanderson.org To: php-db@lists.php.net Subject: RE: [PHP-DB] Dynamic Navigation Bar Date: Thu, 22 Dec 2005 09:38:01 -0600 Thanks for the quick response, Bastien. I was thinking that using hidden fields may be another way to go. ButNo, you could try keeping that data in sessions or in hidded form fieldswould I assign a value to a form variable via clicking on a link?the page...note that the latter requires that you do a page submit withinonclick of the link / button BastienthethenavigationFrom: dpgirago@mdanderson.org To: php-db@lists.php.net Subject: [PHP-DB] Dynamic Navigation Bar Date: Thu, 22 Dec 2005 09:27:33 -0600 Results from full-text searches on a documents database are returning sometimes 300-400 hits, so I'm gonna need to implement a dynamicandbar. Perhaps this a stupid question, but it seems from a brief googling that navigation bars - dynamic or not - operate by appending variablesgrabbedvalues to the URL within the <A href="...">link</>, which are thenfrom the $_GET array. Can someone shed some light on whether this-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phponly-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpmethod used? And, yes, I know that there is a Pear package that does this, but I'm more inclined to implement my own at present. Thanks very much. David