Jahren
Members-
Posts
66 -
Joined
-
Last visited
Never
Everything posted by Jahren
-
xajax is availlable here : http://www.xajax-project.org/en/download/ I use their test files. so i use : <?php include './xajax/xajax_core/xajax.inc.php'; $xajax = new xajax(); $rqstAdd =& $xajax->register(XAJAX_FUNCTION, 'doAdd'); $rqstReset =& $xajax->register(XAJAX_FUNCTION, 'doReset'); // set the parameters $rqstAdd->setParameter(0, XAJAX_JS_VALUE, 39); $rqstAdd->setParameter(1, XAJAX_JS_VALUE, 571); $xajax->processRequest(); function doAdd($a, $b) { $response = new xajaxResponse(); $response->assign('answer', 'innerHTML', $a + $b); $response->assign('reset', 'style.display', 'block'); return $response; } function doReset() { $response = new xajaxResponse(); $response->clear('answer', 'innerHTML'); $response->assign('reset', 'style.display', 'none'); return $response; } I cant even create the Ajax object. gives me the weird error. I tried their support forums but its kinda dead :S thanks for your time
-
I'm using the unedited files from xajax. I dont change anything, I just try to use their own test files and it doesn't let me.
-
mysql_real_escape_string() adds slashes to those characters to escape, you need not to worry about an email, it wont inject sql code
-
hi! I'm trying to use xajax on my server but I get a weird error : Fatal error: Call to undefined function phpdebug_print_backtrace() in /home/client/public_html/Bidup/admin/xajax/xajax_core/plugin_layer/xajaxEventPlugin.inc.php on line 1 for some reason it believes the <?php tag is part of the debug+print call. code : <?php debug_print_backtrace(); The exact same files works perfectly on my local webserver. I don't know what to do, please help xD
-
Well, because a browser interpretation of code and url interpretation can differ alot from a version to an other. is it external hosting? (I believe so but still asking)
-
what version of IE? any manuipulation with the url? not encoded special chars?
-
You're going to need to be more specific
-
Hmmm, try seperating the operations to simplify the model. first you want all types in order. then use a temp array to store the data. (declare the array before the first loop.) $query = "SELECT id_type, str_type FROM types ORDER BY str_type ASC"; then I need to understand why $i=30 ; $i<98. is it that you want to loop for each type you get from the first query?
-
err, I misread, it's not your fault. SELECT id_type, str_type FROM types ORDER BY str_type ASC change id_type and str_type to your columns' real name
-
This code sorts stuff alphabeticaly already. if you meant you want alpha numerical: $query = "SELECT * FROM restaurants WHERE (type LIKE '%$i%') AND (zips LIKE '%$zipcode%') AND (type NOT LIKE '99') ORDER BY name + 0 ASC";
-
[SOLVED] Linking PHP and I get a parse error?? help!!
Jahren replied to esevato's topic in PHP Coding Help
php code must be inserted into <?php ?> brackets. use of shortends is possible but not recommanded, its not multi-plateform friendly <?xml version="1.0"?> is a shortend for <?php xml version="1.0" ?> hence, php believes this is php code The answer is: disable short_open_tag in the php.ini. OR use <?php echo("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); ?> -
oh, this validator is for html only! open your browser, get to your page, right-click anywhere and click source code. copy THAT code and paste it into the validator
-
Direct input means you copy your page's code into the validator, not only the url.
-
you will need to read some tutorial on the subject unfortunately (or fortunately 'cuz learning is great ^^) Otherwise, you will never learn, and if you don't want to learn, we won't do your homework We are here to help if you have questions tho. http://www.tizag.com/phpT/phpsessions.php
-
how about ORDER BY clause? $query="SELECT * FROM `calls` WHERE `status` = '1' AND `priority` != 1 ORDER BY theDate"; or $query_customer="SELECT `name` FROM `customers` WHERE `id` = $customer ORDER BY theDate"; link: http://www.w3schools.com/sql/sql_orderby.asp
-
have you tried direct input as I mentioned earlier?
-
I don't understand. your buttons will resolve a link in plain html anyways. If you want to redirect from php for any reason, try: //Some condition here, like is the guy logged in? header("Location:http//address.com"); link : http://ca3.php.net/manual/en/function.header.php
-
where is context from ? is it a session variable? session_start(); is required to access those vars. using $_SESSION['assoc_array_key']
-
if(is_numeric($IThinkItsANumber)) //bla What is the error with is_numeric? reference: http://us3.php.net/manual/en/function.is-numeric.php
-
have you tried by direct input? http://validator.w3.org/#validate_by_input
-
im not sure what you ask for, do you need to cache search results for later use?
-
i'M not sure I understand, you want to send a confirmation email in that code, or you need to know if the SQL query has worked? $SomeVar = $fin; $query = "SELECT * FROM dyomails WHERE ID = '$SomeVar'"; $results = mysql_query($query); if($results){ //IT WORKS if($line = mysql_fetch_assoc($results)) { echo "<item>" . $line["Email"] . "</item>\n"; } } else{ //DOESN'T WORK echo mysql_error($link); }
-
same problem. :S thats weird. if you know xajax, can you tell me if I can be sure that the assigned and scripted stuff will be executed in the order in coded them ?
-
I edited my post above with more content. as for your solution, does it work only on page load? because I need to be able to switch year (hence, data and image) without page reload
-
Because the data changes from year to year. so when you select a year, it fetches the data from that specific year with xajax. What I believe is happening is that $xAjax_objResponse->script("document.getElementById('date1').onchange();"); happens before the data is set on the page even tho I set it up in order. Would that make any sense? and how should I change my approach? I could post some code but you'll always need more edit : In order: I select a year which fires xajax_updateFormValeurs(this.value); updateFormValeurs returns value assigments to html controls and should call an other event: xajax_updateFormDates(xajax.getFormValues('form_plan_action')); This format dates value and call $xAjax_objResponse->script('document.getElementById("nbJoursFeries").onchange();'); nbJoursFeries calls updateForm(); some calculation and stuff AND xajax_updateGraphique(xajax.getFormValues("form_plan_action")); here's the code function updateGraphique($formData){ $xAjax_objResponse = initXajaxObject(); $joursRecit = $formData['nbJoursTravail']; $joursAutre = $formData['nbJoursEntre'] - $joursRecit; $joursTotal = $joursRecit + $joursAutre; if($joursTotal > 0){ $pourcentageRecit = round($joursRecit * 100 / $joursTotal); $pourcentageAutre = round($joursAutre * 100 / $joursTotal); //on parametrise le graphique $pie = new pie_chart(); $pie->set_sizeX(200); $pie->set_sizeY(200); $pie->set_couleur_fond('FFFFFF'); //28211a $pie->add_element($pourcentageRecit, '467287', 'recit', '000', 'RECIT'); $pie->add_element($pourcentageAutre, '28211A', 'autre', 'FFF', 'AUTRE'); $_SESSION['pie'] = $pie; //on grandit l'objet $xAjax_objResponse->assign("pie_chart", "style.width", "200px"); $xAjax_objResponse->assign("pie_chart", "style.height", "200px"); //je vais chercher la map clickable ensuite $xAjax_objResponse->assign("piemap", "innerHTML", $pie->getMapAreaInnerHTML()); } else{ unset($_SESSION['pie']); //on rétrécit l'objet $xAjax_objResponse->assign("pie_chart", "style.width", "50px"); $xAjax_objResponse->assign("pie_chart", "style.height", "50px"); } return $xAjax_objResponse; }