473,326 Members | 2,090 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Yahoo! UI + PHP Array

Hallo NG,

ich möchte gerne die Yahoo UI TreeView Komponenten mit Daten befüllen.
die aus PHP per ajay.request asynchron geladen werden.

Das Beispiel bei Yahoo stellt alles in html und javascript dar und nicht
die Verbindung zu PHP.

Es gab einen Artikel in der Internet Professional 09/2006, allerdings
ist genau der Teil, wo die Arrays oder Werte von JavaScript -PHP und
zurück nach JavaScript nicht ausführlich erläutert und ich komme einfach
nicht weiter.

Hat jemand Erfahrung damit oder kann mir helfen?

<script type="text/javascript">
//<![CDATA[

var tree;
function treeInit() {
tree = new YAHOO.widget.TreeView("treekfz");
tree.setDynamicLoad(loadDataForNode);

var root = tree.getRoot();
myobj = { label: "Mercedes", id:"myid2" } ;
var tmpNode2 = new YAHOO.widget.TextNode(myobj, root, false);

myobj = { label: "Volkswagen", id:"myid3" } ;
var tmpNode3 = new YAHOO.widget.TextNode(myobj, root, false);

tree.draw();
}

function loadDataForNode(node, onCompleteCallback) {
var id= node.data.id;
// -- code to get your data, possibly using Connect --
//var ajax=new Ajax.Updater("response","subnodes.php", {parameters:
"id="+id, asynchronous: false});

ajax.updateContent();

var tmpNode = new YAHOO.widget.TextNode(id + "label1", node, false);
tmpNode = new YAHOO.widget.TextNode(id + "label2", node, false);

// Be sure to notify the TreeView component when the data load is complete
onCompleteCallback();
}
</script>

Soweit bin ich. Was ich nicht verstehe, welche Parameter übergebe ich an
das PHP Script und welches Array muss ich zurückgeben in dem dann die
geholten Werte stehen?

Vielen Dank und Gruß
Sascha Deus
Apr 13 '07 #1
3 2645
Sascha Deus kirjoitti:
Hallo NG,

ich möchte gerne die Yahoo UI TreeView Komponenten mit Daten befüllen.
die aus PHP per ajay.request asynchron geladen werden.
Could you please ask in English?

Err... Können Sie bitte im Englische fragen?
I'm sorry, I'm terrible at german... ^_^

--
Ra*********@gmail.com

"Wikipedia on vähän niinq internetin raamattu, kukaan ei pohjimmiltaan
usko siihen ja kukaan ei tiedä mikä pitää paikkansa." -- z00ze
Apr 13 '07 #2
I'm not really good in english, but i will try it!

Hello,

i don't be able to fill the treeview component with data of an array,
filled by a php script.

Could any body help me, please?

The Examples of yui are really nice, but only in html and javascript.
I need an ajax.updater who calls a php script and fills in the subnodes
dynamically.
Rami Elomaa schrieb:
Sascha Deus kirjoitti:
>Hallo NG,

ich möchte gerne die Yahoo UI TreeView Komponenten mit Daten befüllen.
die aus PHP per ajay.request asynchron geladen werden.

Could you please ask in English?

Err... Können Sie bitte im Englische fragen?
I'm sorry, I'm terrible at german... ^_^
Apr 13 '07 #3
Sascha Deus wrote:
I'm not really good in english, but i will try it!

Hello,

i don't be able to fill the treeview component with data of an array,
filled by a php script.

Could any body help me, please?

The Examples of yui are really nice, but only in html and javascript.
I need an ajax.updater who calls a php script and fills in the subnodes
dynamically.
Rami Elomaa schrieb:
>Sascha Deus kirjoitti:
>>Hallo NG,

ich möchte gerne die Yahoo UI TreeView Komponenten mit Daten befüllen.
die aus PHP per ajay.request asynchron geladen werden.

Could you please ask in English?

Err... Können Sie bitte im Englische fragen?
I'm sorry, I'm terrible at german... ^_^
I haven't looked, but you are either going to have to call your PHP with
Ajax whenever you need your tree changing, and either
a) Send back a delimited string with data in it, parsing with Javascript
or to build a javascript array
b) Use PHP to dynamically build your javascript code and then use
equivalent of eval in javascript to execute the returned code?

If i get time later i might take a look, just very busy at the mo.
Apr 13 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: dan roberts | last post by:
Folks, This is my first Python project so please bear with me. I need to download data from Yahoo Finance in CSV format. The symbols are provided in a text file, and the project details are...
6
by: Travis | last post by:
Can someone give me an example of connecting to yahoo's smtp server and sending mail? I'm doing this: msg = MIMEText(self.text_ctrl_1.GetValue()) msg = sub msg = 'bossierbossman@yahoo.com' msg...
0
by: Mahesh Devjibhai Dhola | last post by:
Hi, I want to develop p2p (peer-to-peer) communication connection for chat in ..Net (Lang: c# - preferable) NOTE: if two LAN are behind their own router then also it should work as yahoo, msn...
11
by: Brett | last post by:
In Yahoo mail, I click the Inbox link and see my messages. If I view source, I don't have HTML which contains the URL of each message. The source HTML contains javascripting and framesets. This...
6
by: erdem kemer | last post by:
i cant send mail to yahoo mail or hotmail while i can send my other mail accounts (pop3) is it becouse yahoo and hotmail is web-based mail here is the code MailMessage mailMsg = new...
4
by: joe_public34 | last post by:
Hello all, I'm trying to write a script to log into Yahoo! (mail, groups, etc), but when I pass the full URL with all form elements via Python, I get a resutling 400 - Bad Request page. When I...
2
by: Dave Lee | last post by:
My apologies for probably being in the wrong group, but there does seem to be some discussion possibly related to my problem. I have a typical, personalized "my.yahoo" page and recently most all of...
0
by: Page O Rama | last post by:
Hi, R U BLOCKED ON MSN,YAHOO,ICQ OR AOL Messenger By Your Friend, Then What are you waiting for.Visit one of the link below to find out who has blocked you in his/her friend list. MSN Block...
1
by: Andrew | last post by:
Hello, friends, I am implementing web app security using asp.net 1.1, and I found the following source code from Yahoo! Mail login page: <form method="post"...
1
by: PeterAlt | last post by:
I have a Yahoo store. In order for me to access via javascript or HTML (on the client side) any information stored in Yahoo's product fields, I have to use something that looks like this... ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.