Click to See Complete Forum and Search --> : [RESOLVED] Jump to a spot on a page upon loading


sw41
06-09-2009, 04:29 PM
I have made a sql output table that is 200 rows. Based of if one of the columns is empty or not, I would like to jump do the next empty row each time the page is loaded... so row 30 is empty, load the page and row 30 is visible, then 31, then 32, and so on. The forumula to check if the field is empty is easy, I just cant get the display to go to there.

I tried using a FORM to have the focus jump to the text field but I do not want anything to show up in the display, the text field shows up and it does not work if I make it a hidden field.

devinemke
06-09-2009, 06:06 PM
pull the data from the db and build your output string row by row with anchor tags based on the primary key field:

<a name="123">row #123</a>

then simply tack on that anchor to your URL:

http://www.example.com/index.php#123

sw41
06-16-2009, 04:42 PM
awesome!