PDA

View Full Version : Dynamic link



anna87
May 11th, 2006, 05:13 PM
Greetings,

I have just two questions:


Que1: I have a link which has two categories I want the visitor as soon as clicks on the link the two sublinks materialize (we dont need to reload the whole page). Please tell me how to do that.. (I know php and a bit of ajax)

Que2:I want just besides the link a "updated on 4/23/06" kind of things, which either automatically get the date from database or anything you suggest.

Thank you so much in advance :)

Please help.

bwh2
May 11th, 2006, 07:33 PM
Que1: I have a link which has two categories I want the visitor as soon as clicks on the link the two sublinks materialize (we dont need to reload the whole page). Please tell me how to do that.. (I know php and a bit of ajax)is this what you mean?: http://www.alistapart.com/d/horizdropdowns/horizontal.htm



Que2:I want just besides the link a "updated on 4/23/06" kind of things, which either automatically get the date from database or anything you suggest.
you can pull this from the database if you have a date field in your table which stores the date of the update.

anna87
May 12th, 2006, 03:31 AM
Thank you for the reply



is this what you mean?: http://www.alistapart.com/d/horizdropdowns/horizontal.htm
Yah, but not exactly like that... the example is a menu... with lots of options and bodering too. I have just one link which leads to two option.
Like ... http://www.caltech.edu has when you click on 'admissions' suddenly
'graduate' and 'undergradute' options will appear.




you can pull this from the database if you have a date field in your table which stores the date of the update.
Well... can you please tell me how to do that. I mean how to write DHTML code for that.

bwh2
May 12th, 2006, 03:59 AM
to figure out how the caltech.edu menu works, the best way is to look at the code. briefly looking at it, it looks like a series of javascript functions written in several javascript files. the beginning of the series is the clickOnNavBar() function.

as far as pulling from a database, you will need a server-side language like PHP or ASP to do that. without having any details about the site you're trying to make, it's hard to help with any coding.

anna87
May 12th, 2006, 04:07 AM
to figure out how the caltech.edu menu works, the best way is to look at the code. briefly looking at it, it looks like a series of javascript functions written in several javascript files. the beginning of the series is the clickOnNavBar() function.
So, it is JSP magic. Thank you for showing me right direction.I will look into it, meanwhile if anybody gets anything please do post.



as far as pulling from a database, you will need a server-side language like PHP or ASP to do that. without having any details about the site you're trying to make, it's hard to help with any coding. Yes I know php and mysql. The content which any particular link lead will be stored into myql. Only thing I want to know how to write the thing dynamically. (I know how to connect and retrieve the date, I can get the date in a php variable, but how to show it just beside a link like above.)