|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#61
|
||||
|
||||
|
Quote:
Yes... all have id associated with them. |
|
#62
|
||||
|
||||
|
You should change your php to output the state's ID number and the county's ID number in their appropriate link's rel tag instead of the state's name and the county's name. The JavaScript shouldn't need to change at all to accommodate this; only "yourbannerloader.php" will change. Give me a bit and I'll try and think of a way to rotate the images. (Have an idea brewing in my head, just need to think it out.
)
__________________
[read: PHP Security Guide | CSRF | PCRE Modifiers | Encryption | Form Processing | File Validation] [tools: PHPEd | PHP Docs | jQuery | CodeIgniter | Drupal | SwiftMailer | CKEditor | reCAPTCHA] |
|
#63
|
||||
|
||||
|
Quote:
Alright... Thanks. Also, would like them to be random.... 1 I came across would rotate them in the same order entirely.... so if I clicked Gainesville, it would show the 1st, then 2nd, etc.... then if I clicked Marion, it would restart from the 1st, then 2nd, etc... |
|
#64
|
||||||||
|
||||||||
|
Ok this is what I came up with.
retrieve_banners.html html Code:
php Code:
I think I've accommodated for everything, but again, its the end of the day and I tend to think poorly around this time of day. ![]() |
|
#65
|
||||
|
||||
|
Thanks... I will try those out in the morning...
As for the database, I have 1 table that stores pretty much everything... so there are roughly 25 fields... 1 is logo, and 1 is website. The logo field will only store the filename (hopefully.. haven't created the upload script yet). But ideally, I was just going to have the filename there. I was sort of picturing being able to have 'type' and 'value' from the other script you had created to build out the path for the files and such... But as I mentioned, will try all this out in the morning... think I'm making it an early night tonight. |
|
#66
|
||||
|
||||
|
Alright... I changed over the rel's to have the value of the id, but I may not have my db structure in such a way that this'll work properly.
Basically, here's the structure of the tree... A user logs in and creates his listing... enters in his city, county, and state... all of this info for his item is stored in a table, 'list'.. From 'list', I have the php pulling all the info alphabetically by state, then county, then city.... Then it displays the state... county... city... item.... (of course checking for duplicates... if a duplicate exists, it doesn't print, and keeps going...) So basically, by assigning id to rel, not every id will be used... |
|
#67
|
||||
|
||||
|
So your database isnt normalized. In other words, you are storing the full state, city, and county name for each item. Correct?
|
|
#68
|
||||
|
||||
|
Quote:
Nothing about my programming is normalized.. ![]() Yes... full state, city, and county are stored in same table as items. I have a separate table for cities, counties, and states.. but this table is used for drop down boxes in their profile.... When a user logs in, they then can add the item to the db which includes name, phone, fax, state, city, county, website, etc..... |
|
#69
|
||||
|
||||
|
Alright... so after working the last couple of days on this rotating banner thing, trying your code, etc, I got 1 thing to work. I played around with the jQuery Cycle plugin again, and got it to work... in IE6. For whatever reason, it doesn't work in FF, Opera, Flock, Safari, Chrome, etc.... Not sure what the problem is, but here's what's happening.
In IE6 (I dont have 7 or 8, so havent tried those), if I click the folder tree, I have the right column rotating preset images. (I'll change code after I get this to work to reflect images from various counties, etc). In the other browsers, if I click a folder tree item, the 1st image displays... and that's it. Nothing rotates. However, if I go direct to domain.com/yourbannerloader.php (which is the php page pushed into the right column div), then the images rotates as they should. So something is preventing the javascript from being pushed into the right column?... Initially, I thought maybe a conflict between the jquery folder tree and jquery cycle plugin.... but then I loaded all .js files together in the files, and went direct to yourbannerloader.php again, and it still worked. (dont know what this means as direct on that page, the actual folder tree isnt loaded) Anyways... I'm confused as to what would be preventing the javascript from working in the right column, but allowing it to work on the page itself. There are about 6 or so .js files and I can post the code from all of those or the site or whatever... just let me know what info would make things easier for you to assist with. (I'll put the site live tomorrow and post a link so you can see what exactly is going on.) Thanks |
|
#70
|
||||
|
||||
|
The reason your javascript probably is not working in most browsers is because javascript written in a page that is pulled via ajax is generally not executed. IE6 may just be an exception. That is why my code is designed to simply pull a list of images from the php script and let your calling page handle it.
Because you have not normalized your database, we'll have to change how the script works slightly. I'll get back to you tomorrow, or at the very latest a couple days. Mondays always suck at work. ![]() Last edited by simshaun : July 6th, 2009 at 12:07 AM. |
|
#71
|
||||
|
||||
|
Something that might help your testing out:
https://secure.xenocode.com/Browsers/ |
|
#72
|
||||
|
||||
|
Quote:
Thanks... Still no clue what normalized database means though.. ![]() Let me know any questions or info you need... or I can just set ya up with a login to phpmyadmin so you can see how my db is set up.... |
|
#73
|
||||
|
||||
|
typically for ajax request, you don't pull an entire page, but just a block of html.
Have the necessary javascript libraries included already on the page and call whatever necessary function calls upon the successful ajax completion. |
|
#74
|
||||||||
|
||||||||
|
Sorry it took so long. This is untested, as I was kinda rushed to finish it. As I said before, things are little hectic here.
index.html html Code:
yourbannerad.php php Code:
|
|
#75
|
||||
|
||||
|
I appreciate all the help in this thread.. I have learned some, but it's now official.. I'm stupid when it comes to this stuff... Been playing with it off and on now for the last few weeks or months or something, and it's really getting to take too long... so I'm going to post this over in the Project Help section...
Again.. I do appreciate the time you've taken, but I don't think I'll ever understand it. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > PHP Development > PHP-General - $_GET using an iframe |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|