PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #46  
Old July 1st, 2009, 04:55 PM
hiker's Avatar
hiker hiker is offline
They're coming to take me away
Click here for more information
 
Join Date: Jan 2005
Location: Florida
Posts: 4,149 hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)  Folding Points: 33832 Folding Title: Starter FolderFolding Points: 33832 Folding Title: Starter Folder
Time spent in forums: 2 Months 2 Weeks 8 h 58 m 6 sec
Reputation Power: 3178
Quote:
Originally Posted by simshaun
If you are done testing, yea.

Responding to your previous post, you could do what you were talking about with the middle column and allowing States and Cities to have banners, but it would take some more work and modifications (naturally). Which do you want to do first?


I know that if a city is clicked on, banners for the county will be displayed.... so both the city and county will have the same banners.

However, for the states, he wants it so that any banners from the state are displayed.

So if we can, lets finish up this part... then I'll see if I can play around with the content and ask questions with that if I can't get it to work...

Reply With Quote
  #47  
Old July 1st, 2009, 04:57 PM
simshaun's Avatar
simshaun simshaun is offline
$x=104;echo chr($x++),chr($x);
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Mar 2008
Location: North Carolina
Posts: 1,658 simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)  Folding Points: 18142 Folding Title: Novice Folder
Time spent in forums: 2 Weeks 4 Days 2 h 18 m 38 sec
Reputation Power: 1384
Exactly what kind of information are you needing to pass to the content area, and when?
Only when the user clicks a city?

Reply With Quote
  #48  
Old July 1st, 2009, 05:38 PM
hiker's Avatar
hiker hiker is offline
They're coming to take me away
Click here for more information
 
Join Date: Jan 2005
Location: Florida
Posts: 4,149 hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)  Folding Points: 33832 Folding Title: Starter FolderFolding Points: 33832 Folding Title: Starter Folder
Time spent in forums: 2 Months 2 Weeks 8 h 58 m 6 sec
Reputation Power: 3178
Quote:
Originally Posted by simshaun
Exactly what kind of information are you needing to pass to the content area, and when?
Only when the user clicks a city?


When a user clicks a city, it drops down to list certain items. Each of those items will be linked to go to the content area.

The information displayed will be all of the business information pertaining to the item....

bus_name
address
city
county
state
zip
phone
fax
email
logo
website
sunday
monday
tuesday
wednesday
thursday
friday
saturday
description

(All of the above are the exact variable names from the db)

Reply With Quote
  #49  
Old July 1st, 2009, 05:49 PM
simshaun's Avatar
simshaun simshaun is offline
$x=104;echo chr($x++),chr($x);
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Mar 2008
Location: North Carolina
Posts: 1,658 simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)  Folding Points: 18142 Folding Title: Novice Folder
Time spent in forums: 2 Weeks 4 Days 2 h 18 m 38 sec
Reputation Power: 1384
What I would do then, is give each "item" within your treemenu a unique class and set their rel attribute to their id number. Example:
Code:
<a href="#" class="item_to_content" rel="1">Item 1</a>


And in your JavaScript, add this underneath the the $hitareas.click() part. (Not in $hitareas.click())
PHP Code:
var $items_to_content = $("a.item_to_content");
    
$items_to_content.click(function(e) {
        
e.preventDefault();
        
item_id = $(this).attr('rel');
        $.
ajax({
            
type'post',
            
url'getitemdata.php',
            
data'item_id=' item_id,
            
success: function(msg) {
                $(
'.content').html(msg);
            }
        });
    }); 

getitemdata.php should take $_POST['item_id'], retrieve its data, and output the table or whatever you want to display to the user. The $.ajax call will take the php script's output and put it within the .content td.
Comments on this post
Onslaught agrees!
hiker agrees!

Last edited by simshaun : July 1st, 2009 at 05:53 PM.

Reply With Quote
  #50  
Old July 1st, 2009, 06:09 PM
hiker's Avatar
hiker hiker is offline
They're coming to take me away
Click here for more information
 
Join Date: Jan 2005
Location: Florida
Posts: 4,149 hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)  Folding Points: 33832 Folding Title: Starter FolderFolding Points: 33832 Folding Title: Starter Folder
Time spent in forums: 2 Months 2 Weeks 8 h 58 m 6 sec
Reputation Power: 3178
Ok... so I created links for the items and set rel to the $id... viewed the source, and all the rel's seem to populate correctly.

I then added the script below hitarea.... for you to verify, here's what the code looks like:

Code:
<script type="text/javascript">
/**
* Declaration of updateBannerAd function.
*/
function updateBannerAd(county) {
    $.ajax({
        type: 'post',
        url: 'yourbannerloader.php',
        data: 'county=' + county,
        success: function(msg) {
            $('#bannerDiv').html(msg);
        }
    });
}

$(function(){
    $('#tree').treeview({
        collapsed: true,
        animated: 'medium',
        control: '#sidetreecontrol',
        prerendered: true,
        persist: 'location'
    });

    var $hitareas = $('.hitarea');
    $hitareas.click(function() {
        var $this = $(this);
        var $anchor = $this.find('a:first');
        var county = $anchor.attr('rel');

        // Required since some hitarea anchors are not for counties. (ie: States)
        if (county != '' && county !== undefined) {
            // Only call updateBannerAd when the user expands the node.
            // The only way I could think of to test if the node was expanding was
            //    to look at the ul's height property and see if it was 1px.
            // I couldn't just use an if is(:hidden) condition on the ul because treeview
            //    already unhides the ul and is animating its height property by
            //    the time this function is executed.
            if ($this.parent().find('ul:first').css('height') == '1px') {
                updateBannerAd(county); // Pass the county to the updateBannerAd function.
            }
        }
    });
		var $items_to_content = $("a.item_to_content");
    $items_to_content.click(function(e) {
        e.preventDefault();
        item_id = $(this).attr('rel');
        $.ajax({
            type: 'post',
            url: 'getitemdata.php',
            data: 'item_id=' + item_id,
            success: function(msg) {
                $('.content').html(msg);
            }
        });
    });  
});
</script>  


I then created a page, getitemdata.php, with this code:
Code:
<?php
$id = $_POST['item_id'];
print $id;
?>


But it's not populating the id... and I thought I was beginning to understand some of this...

(I did, just to try, switch .content to #content, and created a div with id set to content... that didn't work either...)

Thanks...

Reply With Quote
  #51  
Old July 1st, 2009, 06:18 PM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed God (5000 - 5499 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 5,161 Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 5 Days 21 h 37 m 35 sec
Reputation Power: 766
if I'm not mistaken,
Code:
$("a.item_to_content");
searches for anchor tags with the class item_to_content which you don't currently have set any class for those anchors.
Comments on this post
simshaun agrees: This is probably correct.
hiker agrees: Awesome!

Reply With Quote
  #52  
Old July 1st, 2009, 06:24 PM
hiker's Avatar
hiker hiker is offline
They're coming to take me away
Click here for more information
 
Join Date: Jan 2005
Location: Florida
Posts: 4,149 hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)  Folding Points: 33832 Folding Title: Starter FolderFolding Points: 33832 Folding Title: Starter Folder
Time spent in forums: 2 Months 2 Weeks 8 h 58 m 6 sec
Reputation Power: 3178
Quote:
Originally Posted by Onslaught
if I'm not mistaken,
Code:
$("a.item_to_content");
searches for anchor tags with the class item_to_content which you don't currently have set any class for those anchors.


Yep.. Now I see the id's... Yay... Ok... so now last thing.. please don't hate me..

For the folder tree.... I want the city to populate banners for the county that city belongs to... I added a rel=$county tag to the city menu items.. and this seems to work. Is there any problem with just doing this? For example, if someone clicks Gainesville, I want the banners for Alachua to still be populated... Seems to work just by adding the rel tag...

Now... how would I make it so if someone clicks the state itself, it'd populate that for the banner? Basically, if Florida is clicked, any banner for any county/city under Florida will be displayed (rotated).

Thanks...

Reply With Quote
  #53  
Old July 1st, 2009, 06:35 PM
simshaun's Avatar
simshaun simshaun is offline
$x=104;echo chr($x++),chr($x);
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Mar 2008
Location: North Carolina
Posts: 1,658 simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)  Folding Points: 18142 Folding Title: Novice Folder
Time spent in forums: 2 Weeks 4 Days 2 h 18 m 38 sec
Reputation Power: 1384
There is no problem with the mod you made.
The reason it works is because the script looks for any hitarea anchors with a rel attribute, whether it be a State, County, or City. If it has a rel attribute, it sends it off to PHP with AJAX.

To make it support States being clicked as well, you will need to make some modifications. Rather than try to explain it, it will probably be easier to give you the code. Unfortunately, I'm leaving work and you will have to wait until tomorrow though.

If you want to mess around and try to make it work, this is what I'm planning:
  • Put "county|" in front of your county and city link's rel attributes so they become "county|Marion".
  • Put "state|" in front of your state link's rel attributes so they become "state|Florida".
  • In the JavaScript, split the rel attribute on the | symbol using JavaScript's native .split() function and store it in "segment".
  • Send segment[0] as the first argument and segment[1] as a second argument to your updateBannerAd function. example:
    Code:
    function updateBannerAd(type, value) {
    	$.ajax({
    		type: 'post',
    		url: 'yourbannerloader.php',
    		data: {
    			type: type,
    			value: value
    		},
    		success: function(msg) {
    			$('#bannerDiv').html(msg);
    		}
    	});
    }
  • Your php script will end up receiving $_POST['type'] (state or county) and $_POST['value'] (Florida or Marion). Your PHP script outputs different ads based on $_POST['type'].
Comments on this post
Onslaught agrees: good idea

Last edited by simshaun : July 1st, 2009 at 06:39 PM.

Reply With Quote
  #54  
Old July 1st, 2009, 08:48 PM
hiker's Avatar
hiker hiker is offline
They're coming to take me away
Click here for more information
 
Join Date: Jan 2005
Location: Florida
Posts: 4,149 hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)  Folding Points: 33832 Folding Title: Starter FolderFolding Points: 33832 Folding Title: Starter Folder
Time spent in forums: 2 Months 2 Weeks 8 h 58 m 6 sec
Reputation Power: 3178
I'm going to try playing with what you mentioned... see where it gets me. Thanks for all the help thusfar.

Reply With Quote
  #55  
Old July 2nd, 2009, 10:55 AM
simshaun's Avatar
simshaun simshaun is offline
$x=104;echo chr($x++),chr($x);
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Mar 2008
Location: North Carolina
Posts: 1,658 simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)  Folding Points: 18142 Folding Title: Novice Folder
Time spent in forums: 2 Weeks 4 Days 2 h 18 m 38 sec
Reputation Power: 1384
Here is the update I was talking about.
PHP Code:
<script type="text/javascript">
/**
* Declaration of updateBannerAd function.
*/
function updateBannerAd(typevalue) {
    $.
ajax({
        
type'post',
        
url'yourbannerloader.php',
        
data: {
            
typetype,
            
valuevalue
        
},
        
success: function(msg) {
            $(
'#bannerDiv').html(msg);
        }
    });
}

$(function(){
    $(
'#tree').treeview({
        
collapsedtrue,
        
animated'medium',
        
control'#sidetreecontrol',
        
prerenderedtrue,
        
persist'location'
    
});

    var 
$hitareas = $('.hitarea');
    
$hitareas.click(function() {
        var 
$this = $(this);
        var 
$anchor $this.find('a:first');
        var 
rel $anchor.attr('rel');

        var 
segments rel.split('|');
        var 
type segments[0];
        var 
value segments[1];

        if (
rel !== undefined && value != '') {
            
// Only call updateBannerAd when the user expands the node.
            // The only way I could think of to test if the node was expanding was
            //    to look at the ul's height property and see if it was 1px.
            // I couldn't just use an if is(:hidden) condition on the ul because treeview
            //    already unhides the ul and is animating its height property by
            //    the time this function is executed.
            
if ($this.parent().find('ul:first').css('height') == '1px') {
                
updateBannerAd(typevalue); // Pass the required information to the updateBannerAd function.
            
}
        }
    });

    var 
$items_to_content = $("a.item_to_content");
    
$items_to_content.click(function(e) {
        
e.preventDefault();
        var 
item_id = $(this).attr('rel');
        $.
ajax({
            
type'post',
            
url'getitemdata.php',
            
data'item_id=' item_id,
            
success: function(msg) {
                $(
'.content').html(msg);
            }
        });
    });
});
</script> 

Reply With Quote
  #56  
Old July 2nd, 2009, 11:07 AM
hiker's Avatar
hiker hiker is offline
They're coming to take me away
Click here for more information
 
Join Date: Jan 2005
Location: Florida
Posts: 4,149 hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)  Folding Points: 33832 Folding Title: Starter FolderFolding Points: 33832 Folding Title: Starter Folder
Time spent in forums: 2 Months 2 Weeks 8 h 58 m 6 sec
Reputation Power: 3178
Thanks... I'm heading out now, but I'll let you know how it goes when I get back...

Also, I spent about 5 or so hours late last night trying to get something else to work... but I'll let ya know about that later

Reply With Quote
  #57  
Old July 2nd, 2009, 04:33 PM
hiker's Avatar
hiker hiker is offline
They're coming to take me away
Click here for more information
 
Join Date: Jan 2005
Location: Florida
Posts: 4,149 hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)  Folding Points: 33832 Folding Title: Starter FolderFolding Points: 33832 Folding Title: Starter Folder
Time spent in forums: 2 Months 2 Weeks 8 h 58 m 6 sec
Reputation Power: 3178
Well... in case I haven't mentioned it... you rock!

That worked beautifully.

Now... for the last hard part... (well hard for me anyways)...

I've been looking around for a good image rotator based on a directory listing. I found one that I was going to use, but I had to specify the actual files and such within the code. At this point, I created an array using php pulling info from the db... my problem with this though, was that I couldn't figure out how to assign the php value to the javascript item...

Then I searched out some more... came up with another one which... I found cost money... but also had the issue of not being able to assign php variable to the javascript item.

Also with the above 2, with using sample static data and such, I could get them to work if I pulled up the page directly. However, posting to the class and id, nothing ever displayed... another reason I searched out more...

So then finally I came across a jQuery plugin which seemed to do what I wanted... The cycle plugin is the one I was looking at. I wanted to use the fade option. However, after hours, numerous edits, etc, I couldn't get anything to work. I would either get it so only 1 image displayed statically, or all images from the directory displayed one under another. But the rotating part didn't work for me.

Basically what I want, is for the right column to have the rotating banner (or rather rotating images). The directory structure is as follows:
www --> images --> states --> state --> county --> cityn.gif (where n is just a sequential number.. for example, gainesville1.gif, gainesville2.gif, etc.)
Basically state will be Florida, Georgia, etc... and County will be the actual name of the counties...
If Alachua is clicked, for example, I want all the items from the db where the field 'image' is not empty to be pulled as well as the website addresses. All the images that are pulled from the db will be stored in the appropriate image folder, but want it pulled from the db so that the URL can be linked to the images.

Anyways.. I hope this makes sense.

Thanks.

Reply With Quote
  #58  
Old July 2nd, 2009, 04:44 PM
simshaun's Avatar
simshaun simshaun is offline
$x=104;echo chr($x++),chr($x);
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Mar 2008
Location: North Carolina
Posts: 1,658 simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)  Folding Points: 18142 Folding Title: Novice Folder
Time spent in forums: 2 Weeks 4 Days 2 h 18 m 38 sec
Reputation Power: 1384
Let me make sure I understand you correctly.

When the user clicks a State or County, the banner area needs to cycle through the images found for that particular state/county in the database?


(Edit: 1000th post! )
Comments on this post
Onslaught agrees: grats ok 1k

Reply With Quote
  #59  
Old July 2nd, 2009, 04:52 PM
hiker's Avatar
hiker hiker is offline
They're coming to take me away
Click here for more information
 
Join Date: Jan 2005
Location: Florida
Posts: 4,149 hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)hiker User rank is General 33rd Grade (Above 100000 Reputation Level)  Folding Points: 33832 Folding Title: Starter FolderFolding Points: 33832 Folding Title: Starter Folder
Time spent in forums: 2 Months 2 Weeks 8 h 58 m 6 sec
Reputation Power: 3178
Quote:
(Edit: 1000th post! )

Go post this over in the Milestone Posting thread in the Lounge... Congrats on 1000 posts... you couldn't have done it without me..

Quote:
Originally Posted by simshaun
Let me make sure I understand you correctly.

When the user clicks a State or County, the banner area needs to cycle through the images found for that particular state/county in the database?

Well.. it needs to pull the info from the database... the actual images will be cycled from the images directory. So.. yes, when they click a state or county, it'll cycle through the images in the appropriate directory... and the filenames and url's will have been pulled from the database.

(Also, because I just thought of this, wanted to make sure that when a county is clicked, it also needs to pass the state in case the same county is in more than 1 state...)

Reply With Quote
  #60  
Old July 2nd, 2009, 05:02 PM
simshaun's Avatar
simshaun simshaun is offline
$x=104;echo chr($x++),chr($x);
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Mar 2008
Location: North Carolina
Posts: 1,658 simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)simshaun User rank is General 6th Grade (Above 100000 Reputation Level)  Folding Points: 18142 Folding Title: Novice Folder
Time spent in forums: 2 Weeks 4 Days 2 h 18 m 38 sec
Reputation Power: 1384
Deviating just a little bit, do your counties have id numbers attached to them in the database? I assume they probably do. If so, it may be a better idea to pass the id number instead of the county name, instead of worrying about passing both the county and state names.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > PHP-General - $_GET using an iframe


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
Stay green...Green IT