TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 05-08-2008, 06:58 PM   #1 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default Looking for a script

Okay, Ajax is something I know very little to nothing about at this point. I know the basics, but I don't know javascript for a damn, so I'm hoping there's an open source script somewhere I can use.

I have two columns, set width, set height. Links in the first, text content in the second. I need something, using jquery, or mootools or completely standalone, I don't care, that'll let me click a link in the first column, and it will update the content in the second.

Anybody know where I can find this? Thank you in advance,
-m
delayedinsanity is offline  
Reply With Quote
Old 05-08-2008, 07:07 PM   #2 (permalink)
The Acquainted
 
buildakicker's Avatar
 
Join Date: Jan 2008
Posts: 119
Thanks: 21
buildakicker is on a distinguished road
Default

Like this?

mootools demos - Ajax and More options
__________________
SkiLeases.com
buildakicker is offline  
Reply With Quote
Old 05-08-2008, 07:39 PM   #3 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

More like this, but preferably using jquery as I'm already using jquery's lightbox... sorry should've mentioned that.
-m
delayedinsanity is offline  
Reply With Quote
Old 05-08-2008, 07:52 PM   #4 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

Think I found what I needed..
delayedinsanity is offline  
Reply With Quote
Old 05-08-2008, 07:58 PM   #5 (permalink)
The Acquainted
 
freenity's Avatar
 
Join Date: Feb 2008
Posts: 119
Thanks: 17
freenity is on a distinguished road
Default

ok so you have 2 columns:

HTML Code:
<div id="col1"></div>
<div id="col2"></div>
in column1 you will have this link: <a href="loadpage('info.php')">click me</a>

And before this (maybe just after the jquery.js include) you should make this function:

HTML Code:
function loadpage(page)
{
   $.get(page, function(data) { 
                 $('#col2').html(data);
               }
   );
}
This should work, as it gets info.php page and puts it's contents into #col2.
__________________
http://feudal-times.net - My PBB Game
http://gwphp.feudal-times.net - My Blog "Gaming With PHP"
freenity is offline  
Reply With Quote
Old 05-08-2008, 08:24 PM   #6 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

Seriously, it's that simple?

I haven't gotten to my Ajax class yet. That's ridiculous, haha.
-m
delayedinsanity is offline  
Reply With Quote
Old 05-08-2008, 08:26 PM   #7 (permalink)
The Acquainted
 
freenity's Avatar
 
Join Date: Feb 2008
Posts: 119
Thanks: 17
freenity is on a distinguished road
Default

it's simple, that's using jquery. :)
__________________
http://feudal-times.net - My PBB Game
http://gwphp.feudal-times.net - My Blog "Gaming With PHP"
freenity is offline  
Reply With Quote
Old 05-08-2008, 08:56 PM   #8 (permalink)
Jim
The Addict
 
Jim's Avatar
 
Join Date: Nov 2007
Location: the Netherlands
Posts: 281
Thanks: 2
Jim is on a distinguished road
Default

I fix the problem like this in my websites:

Code:
// Vergroot div's hoogte wanneer een andere div hoger is
function changeDiv() {
	
	// Div's hoogte's
	var contentDiv    = document.getElementById('mainContent'); 
	var contentHeight = document.getElementById('mainContent').offsetHeight;
	var browserWindow = document.documentElement; 	
	var menuDiv       = document.getElementById('menu'); 
	
	// Client window
	var clientWindowHeight = browserWindow.clientHeight - 130;
	
	// Grootste hoogte?
	var size = Math.max(clientWindowHeight, contentHeight);
	
	// Set height
	//contentDiv.style.height = size+'px';
	//menuDiv.style.height = size+'px';
	
}

window.onload = changeDiv;
window.onresize = changeDiv;
Should be pretty simple even while the comment is in dutch (since im dutch)

The place where you see -130, is my height of the header. I design my sites like this:

- overall wrapper with optional BG

- header

- col 1
- col 2

- close wrapper

If you choose to use my code and dont get it, don't hestitate mailing me (jim at combined-minds.net)
__________________
Nunchaku! Who doesn't like martial arts? =)
Send a message via MSN to Jim Send a message via Skype™ to Jim
Jim is offline  
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
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 01:38 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design