Mombu the Php Forum

Go Back   Mombu the Php Forum > Php > Need to display subcategories based on categories with ajax
User Name
Password
REGISTER NOW! Mark Forums Read




Reply Bookmark and Share
1 19th November 05:42
itpvision
External User
 
Posts: 1
Default Need to display subcategories based on categories with ajax



Hello,
I have a link navigation of categories retrieved from the database,
while I know how to display subcategories based on category link
clicked with classical approach, I want to do this with ajax,

The problem is with the classical style,I know the GET['id'] sent and
the row im in with the category, so by simple comparison, I know how
to display the subcategories under its parent category, but with ajax,
I cannot know the GET and compare it, so the subcategories are
displaying under a different category

Help appreciated
  Reply With Quote


 


2 19th November 05:42
shanelm
External User
 
Posts: 1
Default Need to display subcategories based on categories with ajax



I'm not sure I fully understand your issue, but i'll take a stab at it
anyway. It sounds like your having trouble because on a standard php
page when someone clicks on a category the id of the category is
passed to the next page, but if you're using some sort of ajax to
build your menus, you don't know how to transfer that value to the
next page...?

If that's the case then what you can do is have a hidden form element
(input type=hidden) and set it via javascript whenever it is clicked.
This is how you can get a client side language (javascript/ajax) to
talk to a server side language (php).

Did that help at all? if not, please try and clarify further, perhaps
posting some code.

good luck!
Shane
  Reply With Quote
Reply


Thread Tools
Display Modes


Some other forums that might be of your interest : Php 5 forum, Apache forum, Iis forum, Functions forum, Classes forum, Librarys forum, Bugs forum, Postgres forum, Mysql forum, Paradox forum, Ms sql forum, Configurations forum, Php.ini forum, Problems forum, Scripting forum, Css forum, General forums, Off-topic talk, Links, Extra forums, Php


Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666