you still have AIM?
FYI, you pulled some of the stuff I did with color. I did that so it would pick up the color for what ever page it on. I did not want the tab/links hard coded for color.
Printable View
you still have AIM?
FYI, you pulled some of the stuff I did with color. I did that so it would pick up the color for what ever page it on. I did not want the tab/links hard coded for color.
I think I see the problem. The appendTo's are not done rendering when the last block of JS is run and its errors. I need a way to make it wait for them.
I think I have it.
Now the next step. I need to be able to include it in an html page with a script tag. fun...
I do still have AIM, Shaun I Am.
I'll keep troubleshooting with you. I think you're in the home stretch now though.
I'm having an issue with the json call.
I've moved the html to http://mi3si.org/beta/3sg_footer-2.htm because I am trying to test loading the json from a separate server using jsonp.
You can see the json here http://3sg.org/beta/include_js.php
The JS is coming from 3sg.org and running with no issue until it throws a "missing variable name" error when processing the json results.
json call code.
PHP Code:var data = $.ajax({
url : 'http://www.3sg.org/beta/include_js.php',
dataType : "jsonp",
jsonp: 'callback',
jsonpCallback: 'getData',
timeout : 10000,
success: function(){
alert("success");
}
});
function getData(data){
$('#tabHeader').text(data.message);
}
Hmm, if you want to use jsonp, here's how I did it:
3SG.org Tabs Demo (Remote Server)
My copy of the json file that the Portland3S domain is accessing can be found at:
http://www.stealthify.com/3sgto/proj...absXserver.php
Does it work for you?
oh this is frustrating. My code with your include works. With mine(which seems to return the same thing) does not work.
ARG.
PHP Code:<?php
$data = array(
"groups"=> array(
array(
"name" => "Events",
"title" => "3000GT/Stealth/GTO Event Pages",
"links" => array(
array("name"=>"3S National Gathering","url"=>"http://www.3sng.org"),
array("name"=>"East Coast Gathering","url"=>"http://www.3secg.com"),
array("name"=>"Upper Mid-West Gathering","url"=>"http://umg.mn3s.org"),
array("name"=>"Blue Ridge Gathering","url"=>"www.blueridgegathering.com"),
),
),
array(
"name" => "Groups",
"title" => "3000GT/Stealth/GTO Clubs and Groups",
"links" => array(
array("name"=>"Michigan 3S","url"=>"http://www.mi3si.org"),
array("name"=>"MInnesota 3S","url"=>"http://www.mn3s.org"),
array("name"=>"Wisconsin 3S","url"=>"http://www.w3si.org"),
array("name"=>"3000GT/Stealth/GTO Forums","url"=>"www.3sgto.org"),
array("name"=>"Texas 3S","url"=>"www.texas3s.com"),
array("name"=>"3000GT/Stealth International","url"=>"www.3sl.org"),
),
),
array(
"name" => "Information",
"title" => "3000GT/Stealth/GTO Information and Resources",
"links" => array(
array("name"=>"Stealth 316","url"=>"http://www.3sng.org"),
array("name"=>"3000GT / Stealth / GTO Information","url"=>"www.3sg.org"),
),
),
),
);
$json_data = json_encode($data);
echo '<pre>('. $json_data.');</pre>';
Remove the pre tags, and designate a callback function (or use the automatically generated one):
PHP Code:<?php
// Build Links Array
$data = array(
"groups"=> array(
array(
"name" => "Events",
"title" => "3000GT/Stealth/GTO Event Pages",
"links" => array(
array("name"=>"3S National Gathering","url"=>"http://www.3sng.org"),
array("name"=>"East Coast Gathering","url"=>"http://www.3secg.com"),
array("name"=>"Upper Mid-West Gathering","url"=>"http://umg.mn3s.org"),
array("name"=>"Blue Ridge Gathering","url"=>"http://www.blueridgegathering.com"),
),
),
array(
"name" => "Groups",
"title" => "3000GT/Stealth/GTO Clubs and Groups",
"links" => array(
array("name"=>"Michigan 3S","url"=>"http://www.mi3si.org"),
array("name"=>"MInnesota 3S","url"=>"http://www.mn3s.org"),
array("name"=>"Wisconsin 3S","url"=>"http://www.w3si.org"),
array("name"=>"3000GT/Stealth/GTO Forums","url"=>"http://www.3sgto.org"),
array("name"=>"Texas 3S","url"=>"http://www.texas3s.com"),
array("name"=>"3000GT/Stealth International","url"=>"http://www.3si.org"),
),
),
array(
"name" => "Information",
"title" => "3000GT/Stealth/GTO Information and Resources",
"links" => array(
array("name"=>"Stealth 316","url"=>"http://www.3sng.org"),
array("name"=>"3000GT / Stealth / GTO Information","url"=>"http://www.3sg.org"),
),
),
),
);
// Encode Links Array to JSON
$json_data = json_encode($data);
// Collect & Sanitize Random callback parameter
$callback = preg_replace("/[^a-zA-Z0-9\.\_\[\]]+/", "", $_GET['callback']);
// Output Results
echo $callback.'('.$json_data.');';
ah you have some extra stuff in your include ;)
I had a feeling that was the case. I added the pre's because they came out if I pulled your file up in a browser
AWESOME
http://mi3si.org/beta/3sg_footer-2.htm
Nice! Glad it worked.
Enjoy.