Well wouldn''t you know as soon as I updated to 1.5.0 all my problems
went away. Well almost all my probs ... I still have a huge mortgage,
a job I''m a slave to, and debt up to my lil'' ol eyebrows
... but it''s safe to know that I can figure out how to get out of a
hole
myself :0).
... Well, atleast I''m not in a box in a hole, in the ground!
I digress.
Thanks to anyone who started looking at this code.
-/\/\z /\/\$ยข
On Feb 28, 12:18 pm, "mzmoneypenny"
<debpe...-H+0wwilmMs3R7s880joybQ@public.gmane.org>
wrote:> Hello, I''m new to this group, but not new to prototype ;-). Am
hoping
> someone can tell me what I''m doing wrong ...
>
> I am currently successfully using the prototype framework within the
> PHP environment. I use Ajax.Request all the time.
>
> The problem I''m having is that I have a deep-div''d page
where a user
> will select a state, and expose the counties belonging to the selected
> state as returned via Ajax.Request and a url call to a php script.
> Each state is within it''s own span and has its element unique id.
> When returned from Ajax, each county is within it''s own span and
has
> it''s own unique element id.
>
> What''s not happing is that the php script is running, and the
county
> span code is being created, but nothing is being returned to the span
> element for a refresh of the response from the php script.
>
> I have also tried Ajax.Updater without success as well.
>
> The state span code generated by php looks like this:
>
> echo("<span class=\"trigger\"
name=\"".$id."\" onClick>
\"expandProfileState(''".$id."'');\"><img
src=\"images/tree/
> folder_closed.png\" align=\"absmiddle\"
id=\"I".$id."\"> ".
> $label."<br></span>");
> echo("<span class=\"branch\"
id=\"".$id."\"></span>");
>
> The function that gets called when a state is selected is:
> function expandProfileState(branch)
> {
> var objBranch = $(branch);
>
> if(objBranch.children.length == 0)
> {
> $(''geography_value'').value = branch;
>
> objBranch.innerHTML = "Retrieving Counties for State
Selected";
> objBranch.style.display="block";
>
> currentBranch = objBranch;
>
> var data = "?state=" + branch;
> var url =
"<?=$cfg[''serverurl''];?>/server/
> processprofilecountytree.php"+data;
> var myAjax = new Ajax.Updater(currentBranch, url, { method:
''post'',
> insertion: Insertion.Bottom });
>
> } else {
> if(objBranch.style.display=="block")
> {
> objBranch.style.display="none";
> }
> else
> {
> objBranch.style.display="block";
> }
> }
> swapFolder(''I'' + branch);
>
> }
>
> The same code using Ajax.Request is as follows:
> function expandProfileState(branch)
> {
> var objBranch = $(branch);
>
> if(objBranch.children.length == 0)
> {
> $(''geography_value'').value = branch;
>
> objBranch.innerHTML = "Retrieving Counties";
> objBranch.style.display="block";
>
> currentBranch = objBranch;
>
> var data = "?state=" + branch;
> var url =
"<?=$cfg[''serverurl''];?>/server/
> processprofilecountytree.php"+data;
> var myAjax = new
Ajax.Request("<?echo($cfg[''serverurl'']);?>/server/
> processprofilecountytree.php",{method: ''post'',
parameters: data,
> onComplete: doProfileExpandStateResponse});
> } else {
> if(objBranch.style.display=="block")
> {
> objBranch.style.display="none";
> }
> else
> {
> objBranch.style.display="block";
> }
> }
> swapFolder(''I'' + branch);
>
> }
>
> function doProfileExpandStateResponse(originalRequest)
> {
> currentBranch.innerHTML = originalRequest.responseText;
>
> }
>
> Thanks in advance.
>
> MzMoneyPenny
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---