Old 26-11-2007, 18:11   #1 (permalink)
pasky
bubbles bubbles
 
Join Date: Nov 2007
Location: Toronto
Posts: 149
Send a message via MSN to pasky Send a message via Yahoo to pasky
AJAX Dynamic Page Load

Hi everybody,

I'm having trouble finishing my website. I'm looking to load new php pages in a div with AJAX without refreshing the whole page. I've tried some scripts but none of them work as they should. Does anybody know where to find a proper working script.

Thank You
  Reply With Quote
Old 26-11-2007, 22:25   #2 (permalink)
iblastoff
gotsa a malanga!
 
iblastoff's Avatar
 
Join Date: Apr 2006
Location: ottawa, canada
Posts: 489
if you tried a bunch of scripts and none of them worked then you're probably doing something wrong.
__________________
  Reply With Quote
Old 27-11-2007, 08:46   #3 (permalink)
pasky
bubbles bubbles
 
Join Date: Nov 2007
Location: Toronto
Posts: 149
Send a message via MSN to pasky Send a message via Yahoo to pasky
got it using scriptaculous
  Reply With Quote
Old 27-11-2007, 09:52   #4 (permalink)
pgo
Senior Member
 
Join Date: Jan 2005
Posts: 12,340
Got a link we can look at?

Quote:
Originally Posted by iblastoff
if you tried a bunch of scripts and none of them worked then you're probably doing something wrong.
.
  Reply With Quote
Old 27-11-2007, 10:30   #5 (permalink)
pasky
bubbles bubbles
 
Join Date: Nov 2007
Location: Toronto
Posts: 149
Send a message via MSN to pasky Send a message via Yahoo to pasky
I will post the link as soon as I figure out the color scheme lol
  Reply With Quote
Old 29-11-2007, 00:51   #6 (permalink)
pasky
bubbles bubbles
 
Join Date: Nov 2007
Location: Toronto
Posts: 149
Send a message via MSN to pasky Send a message via Yahoo to pasky
after solving the problem I find out the div that I am uploading the file to is not updating its height ... any ideas?
  Reply With Quote
Old 29-11-2007, 09:27   #7 (permalink)
rockarena
Registered User
 
Join Date: Nov 2007
Posts: 9
Post a link
  Reply With Quote
Old 29-11-2007, 17:15   #8 (permalink)
pasky
bubbles bubbles
 
Join Date: Nov 2007
Location: Toronto
Posts: 149
Send a message via MSN to pasky Send a message via Yahoo to pasky
Ok I got it. I needed to include a table before importing the file in the div.
The website is torontonightlifespecialists.com/test_new

Now I'm wondering why does it take so long to run my search queries under the club list category at the bottom. *note the website does not have a header yet*. One more thing, all my searches seem to be fine with the exception of 'Bar'. I am performing a full text search in mysql and the only word that it can't find is 'Bar' even tough the other searches are fine.
  Reply With Quote
Old 30-11-2007, 10:37   #9 (permalink)
pasky
bubbles bubbles
 
Join Date: Nov 2007
Location: Toronto
Posts: 149
Send a message via MSN to pasky Send a message via Yahoo to pasky
The website is Toronto Nightlife Specialists

Now I'm wondering why does it take so long to run my search queries under the club list category at the bottom. *note the website does not have a header yet*. One more thing, all my searches seem to be fine with the exception of 'Bar'. I am performing a full text search in mysql and the only word that it can't find is 'Bar' even tough the other searches are fine.

Last edited by pasky : 30-11-2007 at 11:26.
  Reply With Quote
Old 30-11-2007, 13:05   #10 (permalink)
MikeMackay
Everything is fine.
 
MikeMackay's Avatar
 
Join Date: Feb 2005
Location: Witham & London
Posts: 831
Send a message via MSN to MikeMackay Send a message via Skype™ to MikeMackay
I'm not sure how your database is layed out but by the sounds of it you have a field like 'type' or something where the record has a value of (for example):

Restaurant - Lounge - Supper - Club - Nightclub

Is this where you are performing your full text search ? If so, it would be more elegant and better to normalize your data by making a new table and giving each type an id and then creating a 'linked' table where each club is linked to each unique type in the 'type' table.

You would then simply perform a SELECT WHERE type = x and LEFT JOIN the 'venues' table (for example) to the results. This should be more efficient and perhaps a little quicker than performing the full text search. You may also overcome your 'Bar' search issue this way, although I'm not sure why that's occurring currently.

If you need further help, then let me know and I'll post up a sample database schematic for you.

- Mike
  Reply With Quote
Old 30-11-2007, 17:28   #11 (permalink)
pasky
bubbles bubbles
 
Join Date: Nov 2007
Location: Toronto
Posts: 149
Send a message via MSN to pasky Send a message via Yahoo to pasky
Thanks you very much for your input Mike. It sounds to me like a sound solution the only reason I didn't do that was because I was lazy and didn't want to re-write anything in the database tables. Now let me see if I got this.

1. Create a table with the particular types that each club can have giving them a unique id.
2. Link the types table with my clubs table and associate the clubs with their various types. (this I am not to clear how I should go about doing it)

Other than that I'm psyched, let's get these tables rolling :P
  Reply With Quote
Old 01-12-2007, 16:50   #12 (permalink)
MikeMackay
Everything is fine.
 
MikeMackay's Avatar
 
Join Date: Feb 2005
Location: Witham & London
Posts: 831
Send a message via MSN to MikeMackay Send a message via Skype™ to MikeMackay
Right then, let's see if we can break this down into bite-size pieces. Below are the 3 tables necessary to perform the join as I described in my previous post:

Table 1 - types

ID|type
1|Nightclub
2|Club
3|Lounge
4|Bar
5|Restaurant
6|College
7|Supper
...

Table 2 - venues

ID|name|address|features
1|Afterlife Nightclub|250 Adelaide St. W, Toronto|Patio,Smoking,ATM
2|Blue Suede Sues|75 Watline Ave., Mississauga|25 & Over Crowd,Smoking Area,Patio
3|Blurr Nightclub|214 Adelaide St. W, Toronto|N/A
4|Blvd Room|81 Peter St., Toronto|ATM,Smoking,Patio
...

Table 3 - venueTypes

typeID|venueID
1|1
1|2
1|3
1|4
4|4
...

Basically what happens is that you create the table that contains the Types that the venues may contain. Your next main table is the big one that lists the actual Venue information such as Name & Address etc. The 3rd table is the 'linked' table that joins each venue to its unique feature(s).

All you do is create 1 record in the venueTypes table that points to the Venue ID (venue.ID) and the Type ID (type.ID). Both of these fields can be an auto_increment field so that the IDs get assigned automatically or you could manually create them yourself.

You could then build a nice web interface that could easily CREATE or DELETE types from each venue from the venueTypes table where necessary. To perform the search you would then do a SELECT query such as:

SELECT * FROM venueTypes WHERE typeID = x

You will need to peform two table joins in the query to bring back the additional information such as Name, Address etc as well as the type name. I'll leave that last part up to you.

If you get stuck or need further help then post a reply or contact me via MSN and I'll do my best to help you out.

Good luck with it all.

- Mike

PS: You could also go further and put the "Towns" in to a seperate table too.
  Reply With Quote
Old 03-12-2007, 10:47   #13 (permalink)
pasky
bubbles bubbles
 
Join Date: Nov 2007
Location: Toronto
Posts: 149
Send a message via MSN to pasky Send a message via Yahoo to pasky
I'm starting to build the tables now
  Reply With Quote
Old 03-12-2007, 10:51   #14 (permalink)
pasky
bubbles bubbles
 
Join Date: Nov 2007
Location: Toronto
Posts: 149
Send a message via MSN to pasky Send a message via Yahoo to pasky
Thanks a lot Mike, I will let you know when it is complete so you can see it in action
  Reply With Quote
Old 03-12-2007, 12:41   #15 (permalink)
MikeMackay
Everything is fine.
 
MikeMackay's Avatar
 
Join Date: Feb 2005
Location: Witham & London
Posts: 831
Send a message via MSN to MikeMackay Send a message via Skype™ to MikeMackay
Quote:
Originally Posted by pasky
Thanks a lot Mike, I will let you know when it is complete so you can see it in action
You're more than welcome. I'd be interested to see it when it's finished.

- Mike
  Reply With Quote
Old 03-12-2007, 19:20   #16 (permalink)
pasky
bubbles bubbles
 
Join Date: Nov 2007
Location: Toronto
Posts: 149
Send a message via MSN to pasky Send a message via Yahoo to pasky
Thanks Mike now its moving much faster
TNS.com

Here ya go
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8