Jump to content

xcandiottix

Members
  • Posts

    330
  • Joined

  • Last visited

    Never

About xcandiottix

  • Birthday 11/09/1982

Profile Information

  • Gender
    Male
  • Location
    Granger, Indiana

Contact Methods

  • Yahoo
    kcandiotti@sbcglobal.net

xcandiottix's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. Sorry for the misunderstanding initially dcro2. Your way seems to work perfectly. Thank you very much for your assistance!
  2. $liveArray = array(); //Add needed data to JSON creation with required html $liveArray['ID'] = $ID; $liveArray['current'] = number_format(($checkPrice - $deduct),2); $savings = 1-@($checkPrice / $originalPrice); $savings = round($savings, 4); $liveArray['currentSavings'] = $savings*100; $liveArray['place'] = "ON"; $liveArray['buy'] = "OFF"; if($Status == "ON"){ $liveArray['pb'] = "ON"; } else{ $liveArray['pb'] = "OFF"; } $data = json_encode($liveArray); $liveArray['Stream'] = $_GLOBALS['History']; $data = json_encode($liveArray); $myFile = '../json/auctions/'.$ID.'-live.js'; $fh = fopen($myFile, 'w') or die('can\'t open file'); fwrite($fh, $data); fclose($fh); //Set file access chmod('../json/auctions/'.$ID.'-live.js', 0644); //TESTING echo $data; unset($liveArray, $data, $myFile, $fh); Sorry, I didn't show the array construction. Stream already part of the array but it's forcing quotes after the : and before the [ if that makes sense. That's the code that creates the JSON. There's some other things being added to the JSON but they don't affect the problem I'm having. To simplify my issue, I'm using php to create liveArray with a few different json object pairs (name:value). At the end I want to attach an array (name:["value 1","value 2","value 3"]). The problem is that once the array is created, there is an error in the way the array is entered into the json file. The error being that the json_encode() command is placing a double quote BEFORE the opening bracket of the array (name:"["value1...). The double quote between the : [ causes the following double quotes around the array vaules gets escaped (name:"[\"value 1\"]) therefore it cannot be parsed later on when I call it to populate a div.
  3. I'm only working with PHP 5.2 so I don't have the option to include one of the bitmask arguments while encoding an array. I was wondering if someone had a work around for this: $_GLOBALS['History'] .= '['; while($row3 = @mysql_fetch_array($result3)){ $number = $row3['db_Id']; $time = $row3['db_Timestamp']; date_default_timezone_set('America/Phoenix'); $time = date("l M j g:i:s a T Y", $time); $_GLOBALS['History'] .= '"<img src=\'../images/avatar/'.md5($row['db_UserId']).'.jpg\'>'.$row['db_UserId'].'<br>'.$time.'<br>",'; unset($alert); } $_GLOBALS['History'] .= '"0"]'; //SETS LAST RUN AS SOMETHING TO FINALIZE LAST COMMA OF WHILE LOOP I get it to the JSON like so: $liveArray['Stream'] = $_GLOBALS['History']; $data = json_encode($liveArray); $myFile = '../json/auctions/'.$ID.'-live.js'; $fh = fopen($myFile, 'w') or die('can\'t open file'); fwrite($fh, $data); fclose($fh); //Set file access chmod('../json/auctions/'.$ID.'-live.js', 0644); //TESTING echo $data; unset($liveArray, $data, $myFile, $fh); In my JSON file I'll see: {"Stream":"[\"<img src='..\/images\/avatar\/d41d8cd98f00b204e9800998ecf8427e.jpg'><br>Wednesday Dec 31 5:00:00 pm MST 1969<br><br>\",\"<img src='..\/images\/avatar\/d41d8cd98f00b204e9800998ecf8427e.jpg'><br>Wednesday Dec 31 5:00:00 pm MST 1969<br><br>\",\"<img src='..\/images\/avatar\/d41d8cd98f00b204e9800998ecf8427e.jpg'><br>Wednesday Dec 31 5:00:00 pm MST 1969<br><br>\",\"<img src='..\/images\/avatar\/d41d8cd98f00b204e9800998ecf8427e.jpg'><br>Wednesday Dec 31 5:00:00 pm MST 1969<br><br>\",\"<img src='..\/images\/avatar\/d41d8cd98f00b204e9800998ecf8427e.jpg'><br>Wednesday Dec 31 5:00:00 pm MST 1969<br><br>\",\"<img src='..\/images\/avatar\/d41d8cd98f00b204e9800998ecf8427e.jpg'><br>Wednesday Dec 31 5:00:00 pm MST 1969<br><br>\",\"<img src='..\/images\/avatar\/d41d8cd98f00b204e9800998ecf8427e.jpg'><br>Wednesday Dec 31 5:00:00 pm MST 1969<br><br>\",\"<img src='..\/images\/avatar\/d41d8cd98f00b204e9800998ecf8427e.jpg'><br>Wednesday Dec 31 5:00:00 pm MST 1969<br><br>\",\"<img src='..\/images\/avatar\/d41d8cd98f00b204e9800998ecf8427e.jpg'><br>Wednesday Dec 31 5:00:00 pm MST 1969<br><br>\",\"0\"]"} But the proper format of a json array should be {"Stream":["item one","item two","etc"]"} instead of {"Stream":"["item one","item two","etc"]""} So how can I avoid that " after the : ?
  4. I have a jquery / json script I wrote but I'm not very good at this yet. Can anyone help me make this cleaner? <html> <script type="text/javascript" src="../jquery/jquery-1.4.4.min.js"></script> <script type="text/javascript"> var items = []; var x = 0; $.getJSON('updates.js', function(data) { $.each(data, function(key, val) { items.push('<id="' + key + '">' + val + '</li>'); x++; }); }); var y = 0; var auto_refresh = setInterval( function(){ $('#sometext').fadeOut('slow', function(){ if(y < x){ $("#sometext").html(items[y]); y++; } else{ y = 0; $("#sometext").html(items[y]); } } ); $('#sometext').fadeIn('slow'); }, 2000); </script> <div id="sometext"> Hello </div> </html> The json contains: { "one": "Singular sensation", "two": "Beady little eyes", "three": "Little birds pitch by my doorstep" } I want the code to create an array from any key/value pairs in the json, count them, then for each fade it in then out of the DIV .. then replace with the next one on the the fade in. Once it has shown all of them, I;d like for it to restart. This code works right now but it seems awfully clunky to me. As a bonus, I'd like it if I could start at a random number. For example if I have 10 items in the array, it would be great to randomly start at 0 - 9 each page load. Thanks!
  5. I'm currently working on a site that has about 4 separate panels on the page that all use an include to populate. Each include is interacting with the database and I'm thinking that it might congest the databse to have each panel connecting to the same data base and getting data when the page loads. I was wondering if it would be good practice to take all the connections and functions and put them on a 5th include at the top of the page. This way the connections and functions would be available to each include. Is this a good idea? Will it be a problem for the 4 includes to ask the php function list include for data? Is it better to just let each include contain only the code it needs? Also, say I have 20 functions on the php include and one site page only needs to use 1 function. Would the php function include still loop thru and connect to the database for all 20 functions just because it is included or will it only use the bandwidth needed to execute the 1 function it is being asked to use? Hope that's not over confusing. Thanks!
  6. This script is a great improvement! Thanks so much, it works perfect across all browsers.
  7. I am trying to make a small script that counts down from server time to a specific time in the future. The time cannot be altered by the browser / timezone of the visitor. THis script works great in chrome and IE but fails on firefox. Can anyone point me in the right direction? <script language="javascript"> TargetDate = "<?php echo $time;?>"; BackColor = "palegreen"; ForeColor = "navy"; CountActive = true; CountStepper = -1; LeadingZero = true; DisplayFormat = "%%D%%:%%H%%:%%M%%:%%S%%"; FinishMessage = "JUST ENDED"; function calcage(secs, num1, num2) { s = ((Math.floor(secs/num1))%num2).toString(); if (LeadingZero && s.length < 2) s = "0" + s; return s; } function CountBack(secs) { if (secs < 0) { document.getElementById("cntdwn").innerHTML = FinishMessage; return; } DisplayStr = DisplayFormat.replace(/%%D%%/g, calcage(secs,86400,100000)); DisplayStr = DisplayStr.replace(/%%H%%/g, calcage(secs,3600,24)); DisplayStr = DisplayStr.replace(/%%M%%/g, calcage(secs,60,60)); DisplayStr = DisplayStr.replace(/%%S%%/g, calcage(secs,1,60)); document.getElementById("cntdwn").innerHTML = DisplayStr; if (CountActive) setTimeout("CountBack(" + (secs+CountStepper) + ")", SetTimeOutPeriod); } function putspan(backcolor, forecolor) { document.write("<span id='cntdwn' class='time'></span>"); } if (typeof(BackColor)=="undefined") BackColor = "white"; if (typeof(ForeColor)=="undefined") ForeColor= "black"; if (typeof(TargetDate)=="undefined") TargetDate = "12/31/2020 5:00 AM"; if (typeof(DisplayFormat)=="undefined") DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds."; if (typeof(CountActive)=="undefined") CountActive = true; if (typeof(FinishMessage)=="undefined") FinishMessage = ""; if (typeof(CountStepper)!="number") CountStepper = -1; if (typeof(LeadingZero)=="undefined") LeadingZero = true; CountStepper = Math.ceil(CountStepper); if (CountStepper == 0) CountActive = false; var SetTimeOutPeriod = (Math.abs(CountStepper)-1)*1000 + 990; putspan(BackColor, ForeColor); var dthen = new Date(TargetDate); var dnow = new Date("<?php echo date("Y-m-d H:i:s"); ?>"); if(CountStepper>0) ddiff = new Date(dnow-dthen); else ddiff = new Date(dthen-dnow); gsecs = Math.floor(ddiff.valueOf()/1000); CountBack(gsecs); </script>
  8. YES That worked perfectly ... thanks so much!!
  9. Okay here's the simple thing I'm trying to do. I have a time in a db on my server .. let's say its March 1st 2011 at 12:00AM. This time is dynamically set by the server, so it's on server time. Now, lets say today is Feb 28th 2011 at 12:00AM on the server. I'm trying to write a dynamic script that will count down that time .. in this case I would want to show 23:59:59. Every count down script i've found online gives me an option to use local time (browser) or server time. Each time i plug in server time it is always set to my browse time ... I echo everything out and I basically get this: Server time: Feb 28th 2011 at 12:00AM My browser time: Feb 28th 2011 at 2:00AM Script time remaining: 21:59:59 So why does this keep happening? When I echo the date() from the server it's always 2 hours ahead of my time but the script never adjusts. Any ideas or does anyone know of a good working script? I'm on eastern time and the server is on pacific. Here's my last try, you'll see I place the php date into this towards the bottom but I've also tried jquery and SSI methods too. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <script language="JavaScript"> TargetDate = "2/1/2011 12:00 AM"; BackColor = "palegreen"; ForeColor = "navy"; CountActive = true; CountStepper = -1; LeadingZero = true; DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds."; FinishMessage = "It is finally here!"; </script> <script language="JavaScript" src="http://scripts.hashemian.com/js/countdown.js"> */ function calcage(secs, num1, num2) { s = ((Math.floor(secs/num1))%num2).toString(); if (LeadingZero && s.length < 2) s = "0" + s; return "<b>" + s + "</b>"; } function CountBack(secs) { if (secs < 0) { document.getElementById("cntdwn").innerHTML = FinishMessage; return; } DisplayStr = DisplayFormat.replace(/%%D%%/g, calcage(secs,86400,100000)); DisplayStr = DisplayStr.replace(/%%H%%/g, calcage(secs,3600,24)); DisplayStr = DisplayStr.replace(/%%M%%/g, calcage(secs,60,60)); DisplayStr = DisplayStr.replace(/%%S%%/g, calcage(secs,1,60)); document.getElementById("cntdwn").innerHTML = DisplayStr; if (CountActive) setTimeout("CountBack(" + (secs+CountStepper) + ")", SetTimeOutPeriod); } function putspan(backcolor, forecolor) { document.write("<span id='cntdwn' style='background-color:" + backcolor + "; color:" + forecolor + "'></span>"); } if (typeof(BackColor)=="undefined") BackColor = "white"; if (typeof(ForeColor)=="undefined") ForeColor= "black"; if (typeof(TargetDate)=="undefined") TargetDate = "12/31/2020 5:00 AM"; if (typeof(DisplayFormat)=="undefined") DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds."; if (typeof(CountActive)=="undefined") CountActive = true; if (typeof(FinishMessage)=="undefined") FinishMessage = ""; if (typeof(CountStepper)!="number") CountStepper = -1; if (typeof(LeadingZero)=="undefined") LeadingZero = true; CountStepper = Math.ceil(CountStepper); if (CountStepper == 0) CountActive = false; var SetTimeOutPeriod = (Math.abs(CountStepper)-1)*1000 + 990; putspan(BackColor, ForeColor); var dthen = new Date(TargetDate); var dnow = new Date("<!--config timefmt='%c' --><!--echo var='DATE_LOCAL' -->"); if(CountStepper>0) ddiff = new Date(dnow-dthen); else ddiff = new Date(dthen-dnow); gsecs = Math.floor(ddiff.valueOf()/1000); CountBack(gsecs); </script> <br /> <?php $now = new DateTime(); echo $now->format("M j, Y H:i:s O")."\n"; ?> </body> </html>
  10. Well, my problem isn't really the "how to" of cropping. Really what I'm trying to find out is where in this script can I grab the image ... do something to it .. and then put it back into this script. So for example: <?php $directory = $_GET['u']; // filename: upload.processor.php // first let's set some variables // make a note of the current working directory, relative to root. $directory_self = str_replace(basename($_SERVER['PHP_SELF']), '', $_SERVER['PHP_SELF']); // make a note of the directory that will recieve the uploaded files $uploadsDirectory = "/home/content/99/6259799/html/userdirectories/".$directory."/images/"; // make a note of the location of the upload form in case we need it $uploadForm = 'http://' . $_SERVER['HTTP_HOST'] . $directory_self . 'upload.php'; // make a note of the location of the success page $uploadSuccess = 'http://' . $_SERVER['HTTP_HOST'] . $directory_self . 'success.php?u=' . $directory; // name of the fieldname used for the file in the HTML form $fieldname = 'file'; //echo'<pre>';print_r($_FILES);exit; // Now let's deal with the uploaded files // possible PHP upload errors $errors = array(1 => 'php.ini max file size exceeded', 2 => 'html form max file size exceeded', 3 => 'file upload was only partial', 4 => 'no file was attached'); // check the upload form was actually submitted else print form isset($_POST['submit']) or error('the upload form is neaded', $uploadForm); // check if any files were uploaded and if // so store the active $_FILES array keys $active_keys = array(); foreach($_FILES[$fieldname]['name'] as $key => $filename) { if(!empty($filename)) { $active_keys[] = $key; } } // check at least one file was uploaded count($active_keys) or error('No files were uploaded', $uploadForm); // check for standard uploading errors foreach($active_keys as $key) { ($_FILES[$fieldname]['error'][$key] == 0) or error($_FILES[$fieldname]['tmp_name'][$key].': '.$errors[$_FILES[$fieldname]['error'][$key]], $uploadForm); } // check that the file we are working on really was an HTTP upload foreach($active_keys as $key) { @is_uploaded_file($_FILES[$fieldname]['tmp_name'][$key]) or error($_FILES[$fieldname]['tmp_name'][$key].' not an HTTP upload', $uploadForm); } // validation... since this is an image upload script we // should run a check to make sure the upload is an image foreach($active_keys as $key) { @getimagesize($_FILES[$fieldname]['tmp_name'][$key]) or error($_FILES[$fieldname]['tmp_name'][$key].' not an image', $uploadForm); } // make a unique filename for the uploaded file and check it is // not taken... if it is keep trying until we find a vacant one foreach($active_keys as $key) { $now = time(); while(file_exists($uploadFilename[$key] = $uploadsDirectory.$now.'-'.$_FILES[$fieldname]['name'][$key])) { $now++; } } // now let's move the file to its final and allocate it with the new filename foreach($active_keys as $key){ //////////////////////////////////////It seems like I should start here////////////////////////////////////////// @move_uploaded_file($_FILES[$fieldname]['tmp_name'][$key], $uploadFilename[$key]) or error('receiving directory insuffiecient permission', $uploadForm); } // If you got this far, everything has worked and the file has been successfully saved. // We are now going to redirect the client to the success page. header('Location: ' . $uploadSuccess); // make an error handler which will be used if the upload fails function error($error, $location, $seconds = 5) { header("Refresh: $seconds; URL=\"$location\""); echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"'."\n". '"http://www.w3.org/TR/html4/strict.dtd">'."\n\n". '<html lang="en">'."\n". ' <head>'."\n". ' <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">'."\n\n". ' <link rel="stylesheet" type="text/css" href="stylesheet.css">'."\n\n". ' <title>Upload error</title>'."\n\n". ' </head>'."\n\n". ' <body>'."\n\n". ' <div id="Upload">'."\n\n". ' <h1>Upload failure</h1>'."\n\n". ' <p>An error has occured: '."\n\n". ' <span class="red">' . $error . '...</span>'."\n\n". ' The upload form is reloading</p>'."\n\n". ' </div>'."\n\n". '</html>'; exit; } // end error handler ?> Where I noted 'i should start here' .... How do I take the image thats ran in this script so far .. and put it into a variable ... do something to it ... and then put it back. So maybe..... foreach($active_keys as $key){ $image = $_FILES[$fieldname]['tmp_name'][$key]; --I insert whatever cropping, resizing etc-- $_FILES[$fieldname]['tmp_name'][$key] = $image @move_uploaded_file($_FILES[$fieldname]['tmp_name'][$key], $uploadFilename[$key]) or error('receiving directory insuffiecient permission', $uploadForm); } Would that work in theory?
  11. I found a pretty neat script online that generates a form to upload multiple photos. It works fine and saves the image to the correct directory. What I'd like it to do, in addition, is to also generate a thumbnail that is cropped and save it into a different directory. I've reviewed some of the "how to's" and I get it but I'm not sure where to work it in to this existing code. Can anyone help point out where I could take the image file, resize it, and save it into a separate directory? Thanks! <?php $directory = $_GET['u']; // filename: upload.processor.php // first let's set some variables // make a note of the current working directory, relative to root. $directory_self = str_replace(basename($_SERVER['PHP_SELF']), '', $_SERVER['PHP_SELF']); // make a note of the directory that will recieve the uploaded files $uploadsDirectory = "/home/content/99/6259799/html/userdirectories/".$directory."/images/"; // make a note of the location of the upload form in case we need it $uploadForm = 'http://' . $_SERVER['HTTP_HOST'] . $directory_self . 'upload.php'; // make a note of the location of the success page $uploadSuccess = 'http://' . $_SERVER['HTTP_HOST'] . $directory_self . 'success.php?u=' . $directory; // name of the fieldname used for the file in the HTML form $fieldname = 'file'; //echo'<pre>';print_r($_FILES);exit; // Now let's deal with the uploaded files // possible PHP upload errors $errors = array(1 => 'php.ini max file size exceeded', 2 => 'html form max file size exceeded', 3 => 'file upload was only partial', 4 => 'no file was attached'); // check the upload form was actually submitted else print form isset($_POST['submit']) or error('the upload form is neaded', $uploadForm); // check if any files were uploaded and if // so store the active $_FILES array keys $active_keys = array(); foreach($_FILES[$fieldname]['name'] as $key => $filename) { if(!empty($filename)) { $active_keys[] = $key; } } // check at least one file was uploaded count($active_keys) or error('No files were uploaded', $uploadForm); // check for standard uploading errors foreach($active_keys as $key) { ($_FILES[$fieldname]['error'][$key] == 0) or error($_FILES[$fieldname]['tmp_name'][$key].': '.$errors[$_FILES[$fieldname]['error'][$key]], $uploadForm); } // check that the file we are working on really was an HTTP upload foreach($active_keys as $key) { @is_uploaded_file($_FILES[$fieldname]['tmp_name'][$key]) or error($_FILES[$fieldname]['tmp_name'][$key].' not an HTTP upload', $uploadForm); } // validation... since this is an image upload script we // should run a check to make sure the upload is an image foreach($active_keys as $key) { @getimagesize($_FILES[$fieldname]['tmp_name'][$key]) or error($_FILES[$fieldname]['tmp_name'][$key].' not an image', $uploadForm); } // make a unique filename for the uploaded file and check it is // not taken... if it is keep trying until we find a vacant one foreach($active_keys as $key) { $now = time(); while(file_exists($uploadFilename[$key] = $uploadsDirectory.$now.'-'.$_FILES[$fieldname]['name'][$key])) { $now++; } } // now let's move the file to its final and allocate it with the new filename //////////////////////////////////////It seems like I should start here////////////////////////////////////////// foreach($active_keys as $key){ @move_uploaded_file($_FILES[$fieldname]['tmp_name'][$key], $uploadFilename[$key]) or error('receiving directory insuffiecient permission', $uploadForm); } // If you got this far, everything has worked and the file has been successfully saved. // We are now going to redirect the client to the success page. header('Location: ' . $uploadSuccess); // make an error handler which will be used if the upload fails function error($error, $location, $seconds = 5) { header("Refresh: $seconds; URL=\"$location\""); echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"'."\n". '"http://www.w3.org/TR/html4/strict.dtd">'."\n\n". '<html lang="en">'."\n". ' <head>'."\n". ' <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">'."\n\n". ' <link rel="stylesheet" type="text/css" href="stylesheet.css">'."\n\n". ' <title>Upload error</title>'."\n\n". ' </head>'."\n\n". ' <body>'."\n\n". ' <div id="Upload">'."\n\n". ' <h1>Upload failure</h1>'."\n\n". ' <p>An error has occured: '."\n\n". ' <span class="red">' . $error . '...</span>'."\n\n". ' The upload form is reloading</p>'."\n\n". ' </div>'."\n\n". '</html>'; exit; } // end error handler ?>
  12. I created a test with 2 pages. Page 1 ajaxtest.php <html> <head> <script type="text/javascript"> function loadXMLDoc() { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("myDiv").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","ajaxINC.php",true); xmlhttp.send(); } </script> </head> <body> <div id="myDiv"><h2>Let AJAX change this text</h2></div> <button type="button" onclick="loadXMLDoc()">Change Content</button> </body> </html> Standard code from W3schools except instead of a txt file I have it point to ajaxINC.php <script type="text/javascript"> document.write('<b>Hello World</b>'); </script> Now, on ajaxtest.php there's a button. If I press it, the text above the button becomes blank instead of brining in the script from ajaxINC.php. Is it impossible to import javascript script via ajax?
  13. If I grab some javascript can I include it onto a page with element.innerHTML = req.responseText? function selection(selected){ var element = document.getElementById("app1"); req.open('GET', application1, false); req.send(null); element.innerHTML = req.responseText; } document.write("<div id='app1'></div>");
  14. Well, i think you post made good points and honestly I was so focused on the individual pages tat I lost sight of where all the includes were landing. Here's the source code from the browser. Strangely in Chrome, where ever there's javascript it's in plain text .... not color coded like the HTML, CSS, etc. Is it possible that: <script type="text/javascript"> Is wrong? The page loads like so: http://www.appdilly.com/member/user_page.php -Includes in order: -/Appdilly-Logo-and-Banner-User-UP.html (an html banner with js mouse over) -/css_eval.php (dynamically generated css) -/evaluator.php (this is where the problem is) --Requests data from Kcandiotti400.xml --Kcandiotti400.xml has an element with the address for --"/applications/appfiles/3.php?u=Kcandiotti400" --/3.php (evaluator includes this page with in one of evalulator's DIV tags) --3.php includes index.php, index.php's JS does not display. -/Mlowernavbar.html (html nav bar) -/copyright.html (copyright info) I've attached the source for userpage.php evalulator.php 3.php index.php And links to the corresponding live pages: http://www.appdilly.com/member/user_page.php?u=Kcandiotti400 http://appdilly.com/applications/appfiles/3.php http://appdilly.com/applications/includes/3/index.php As you can see the JS works on the last two but not when the entire package is included on the main page. Thanks so much! [attachment deleted by admin]
  15. Well here's where it gets complicated. On the first page i have: <html> <script type="text/JavaScript"> <!-- document.write("Hello World!") //--> </script> </html> <?php echo "Goodbye World";?> Again, navigating directly to the first page gets both printed on screen. But if I navigate to the second page I get: Goodbye World. I don't understand how it can run the php, html, and css that are actually on the first page but not the js. On the second page, here's the part of the page that gets the first page's address from the xml file else{ var element = document.getElementById("app1"); req.open('GET', application1, false); req.send(null); element.innerHTML = req.responseText; } and here's how page one is brought up on the second page document.write("<td width='33%' class='LEFTappcell' align='center' valign='top'><div id='tit1'></div><br><div id='app1'></div></td>");
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.