How can add arguments tid when response Json POST http://localhost/drupal/hierarchical_select_json?tid = tid of term
cuxi - November 6, 2009 - 16:49
| Project: | Hierarchical Select |
| Version: | 6.x-3.x-dev |
| Component: | Code - Taxonomy |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Hi, I use hierarchical_select for vocabulary
I want add tid in response url. And i can process with tid for my website.
i see code hierarchical_select.js
var ajaxOptions = {
url: url,
type: 'POST',
dataType: 'json',
data: post,
beforeSend: function() {
Drupal.HierarchicalSelect.triggerEvents(hsid, 'before-' + updateType, settings);
Drupal.HierarchicalSelect.disableForm(hsid);
},But i can not modify it work.
Any idea can help me?

#1
Set
$_GET['tid'] = 999;before HS runs and that'll happen automatically.
:)
#2
Hi Wim Leers
Thanks you reply.
but i don't know where add to your code.
Please help me
#3
I don't know your code or what exactly you're doing so I can't help you with that. That's up to you.
#4
Hi Wim Leers.
I have 3 field: City , distrist and project
I want when I select city then show distrist and project of that city.
I use taxonomy for city and distrist and a field cck select list for project.
So, I have a table project: with field: tid and project name ( tid project is tid of term),
When i select city then hierarchical_select show distrist but it can't show project in a other box.
So i want GET['tid'] city and Select all project form database where tid = GET['tid'].
then i apply to cck field project.
#5
Hi , Wim Leers.
I add code to:
var tid = $('#edit-taxonomy-1-hierarchical-select-selects-1').val();// Pass the hierarchical_select id via POST.
post.push({ name : 'hsid', value : hsid });
post.push({ name : 'tid', value : tid });
$tid = $_POST['tid'];
and now it's work.
thanks you.
#6
Automatically closed -- issue fixed for 2 weeks with no activity.