Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Old 11-15-2008, 06:27 PM Tabs Not Working?
Skilled Talker

Posts: 81
Trades: 0
I have a quick question about this tutorial. http://www.crackajax.net/tabs.php
I copied everything it told me and did everything. But My problem is this content.php stuff. There tabs, when clicked go to what they want it to say such as "Content For Page 1".
I am trying to firgure out how I get mine to say what I want because I don't know where to put this code:
Code:
if ($_GET['content'] == 1) {  echo 'Content for Page 1';  }   if ($_GET['content'] == 2) {  echo 'Content for Page 2';  }   if ($_GET['content'] == 3) {  echo 'Content For Page 3';  }
I got the thing working and everything but when I click one of the three tabs its blank. Help appreciated!
prodigy64 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-15-2008, 11:27 PM Re: Tabs Not Working?
Experienced Talker

Posts: 41
Name: Jabis Sevon
Location: Tampere, Finland
Trades: 0
could be many things, but wrap the if blocks with issets as well
...
PHP Code:
if(isset($_GET['content'])) {
if (
$_GET['content'] == "1") {
echo 
"1";
}
else if (
$_GET['content'] == "2") {
echo 
"2";
}
else if (
$_GET['content'] == "3") {
echo 
"3";
}
else {
echo 
"Content given, but does not match 1,2 or 3";
}
}
// end isset()
else { echo "default"; } 
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
jabis is offline
Reply With Quote
View Public Profile Visit jabis's homepage!
 
Old 11-16-2008, 03:00 PM Re: Tabs Not Working?
Skilled Talker

Posts: 81
Trades: 0
okay, but my question is (if I didn't state it clearly sorry) Where should I place the php code, the "if" codes.
Thanks
prodigy64 is offline
Reply With Quote
View Public Profile
 
Old 11-16-2008, 06:09 PM Re: Tabs Not Working?
Experienced Talker

Posts: 41
Name: Jabis Sevon
Location: Tampere, Finland
Trades: 0
Quote:
Originally Posted by prodigy64 View Post
I have a quick question about this tutorial. http://www.crackajax.net/tabs.php
I copied everything it told me and did everything. But My problem is this content.php stuff. There tabs, when clicked go to what they want it to say such as "Content For Page 1".
I think it's quite clear
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by jabis; 11-16-2008 at 06:10 PM.. Reason: cleared some unnecessities
jabis is offline
Reply With Quote
View Public Profile Visit jabis's homepage!
 
Old 11-16-2008, 06:31 PM Re: Tabs Not Working?
Skilled Talker

Posts: 81
Trades: 0
No, it isnt
prodigy64 is offline
Reply With Quote
View Public Profile
 
Old 11-16-2008, 07:11 PM Re: Tabs Not Working?
Experienced Talker

Posts: 41
Name: Jabis Sevon
Location: Tampere, Finland
Trades: 0
1) Open content.php
2) paste code provided
3) move to server able to parse php
4) ????
5) profit

ps. you clearly haven't read the docs, so I'd recommend getting familiar to the requirements and the techniques before trying to incorporate stuff you don't have a clue. And no I don't mean any disrespect, but following the documentation usually solves your problems...
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by jabis; 11-16-2008 at 07:14 PM.. Reason: A sidenote added
jabis is offline
Reply With Quote
View Public Profile Visit jabis's homepage!
 
Reply     « Reply to Tabs Not Working?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.29738 seconds with 12 queries