Re: Fw: Dynamic Navigation Bar

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx www.the-spectrum.org ------oOo---------------oOo------ ----- Original Message ----- From: <dpgirago@xxxxxxxxxxxxxx>
To: <php-db@xxxxxxxxxxxxx>; <julien@xxxxxxxxxxxxxxxx>
Sent: Saturday, December 24, 2005 1:03 AM
Subject: Re: Fw:  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.

David

From: "Julien Bonastre" <julien@xxxxxxxxxxxxxxxx>
To: "Bastien Koert" <bastien_k@xxxxxxxxxxx>
Sent: Friday, December 23, 2005 11:01 PM
Subject: Re:  Dynamic Navigation Bar


I 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 related
details
you 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 Javascript
which
as someone else outlined is CLIENT side, hence you are relying on correct

operation 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@xxxxxxxxxxxxxxxx
www.the-spectrum.org ------oOo---------------oOo------
----- Original Message -----
From: "Bastien Koert" <bastien_k@xxxxxxxxxxx>
To: <dpgirago@xxxxxxxxxxxxxx>; <php-db@xxxxxxxxxxxxx>
Sent: Friday, December 23, 2005 1:39 AM
Subject: RE:  Dynamic Navigation Bar


javascript

Bastien


From: dpgirago@xxxxxxxxxxxxxx
To: php-db@xxxxxxxxxxxxx
Subject: RE:  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. But
how
would I assign a value to a form variable via clicking on a link?

>No, you could try keeping that data in sessions or in hidded form
>fields
in
>the page...note that the latter requires that you do a page submit
with
the
>onclick of the link / button
>
>Bastien


>>From: dpgirago@xxxxxxxxxxxxxx
>>To: php-db@xxxxxxxxxxxxx
>>Subject:  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 dynamic
navigation
>>bar. Perhaps this a stupid question, but it seems from a brief
>>googling
>>that navigation bars -  dynamic or not - operate by appending
>>variables
and
>>values to the URL within the <A href="...">link</>, which are then
grabbed
>>from the $_GET array.  Can someone shed some light on whether this
the
only
>>method 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

--
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.php




--
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.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux