Hi,
got a dynamic dropdown, but the result in my second dropdown is some HTML. Seems to be a part of the template. See attached file.
Checked my function who loaded the data:
en got followed result who is returned:
So i don't know why i getting this strange html respons in my second dropdown box.
Someone an idea?
got a dynamic dropdown, but the result in my second dropdown is some HTML. Seems to be a part of the template. See attached file.
Checked my function who loaded the data:
<?php
$cfg = parse_ini_file('config.ini',true);
$db2 = new MySQLi($cfg['dbconn']['host'],$cfg['dbconn']['user'],$cfg['dbconn']['password'],$cfg['dbconn']['database']);
// get Playdates
$results = array();
$results[] = '0=Please select';
$query = "SELECT
teams_events.id as id,
concat(date_format(events.eventdate,'%d/%m/%Y'),' - ', events.description) as playdate
FROM
teams_events
INNER JOIN events ON (teams_events.eventID = events.id)
WHERE
events.seasonID = 3 AND
teams_events.clubID = 339 AND
teams_events.teamID = 2 AND
teams_events.complete = 'N' AND
events.eventdate < curdate()
ORDER BY
events.eventdate";
if ($rs = $db2->query($query)) {
/* fetch associative array */
while ($row = $rs->fetch_assoc()) {
$results[] = $row['id'].'='.$row['playdate'];
}
/* free result set */
$rs->free();
}
$results = implode("\n", $results);
echo $results;
$mainframe =& JFactory::getApplication();
$mainframe->close();
?>
en got followed result who is returned:
string '0=Please select
2=06/09/2013 - Interteams 1
5=13/09/2013 - Interteams 2
8=20/09/2013 - Interteams 3
11=27/09/2013 - Interteams 4
14=04/10/2013 - Interteams 5
17=11/10/2013 - Interteams 6' (length=186)
So i don't know why i getting this strange html respons in my second dropdown box.
Someone an idea?
Hi rodiusd,
Please check your code carefully and try to run the event in your browser window, maybe there are some errors returned with the data ?
You may also write the results in a custom code box:
To make sure that they are returned fine with no PHP code error, if you still get the same HTML then there is some thing else to fix.
Regards,
Max
Please check your code carefully and try to run the event in your browser window, maybe there are some errors returned with the data ?
You may also write the results in a custom code box:
0=Please select
2=06/09/2013 - Interteams 1
5=13/09/2013 - Interteams 2
8=20/09/2013 - Interteams 3
11=27/09/2013 - Interteams 4
14=04/10/2013 - Interteams 5
17=11/10/2013 - Interteams 6
To make sure that they are returned fine with no PHP code error, if you still get the same HTML then there is some thing else to fix.
Regards,
Max
Hi Max,
checked and no error was show. returned string has no spaces before or after.
Don't see where the problem is.
checked and no error was show. returned string has no spaces before or after.
Don't see where the problem is.
Are you sure? the direct ajax event link in your browser returned the results only ? if yes then please send me a link to the form here or using the contact us page so that I can test the ajax response in my browser.
Regards,
Max
Regards,
Max
Hi Max,
in the dynamic dropdown is must enter in the "Extra options extension" something otherwise the event is not fired. With the standard joomla settings we get an error and this is the cullprit of the funny html data in the dropdown box.
To elimate this we must change the followingin the " Joomla 'Global configuration" -> "Server" -> "Error reporting" to none.
Then the dropdown is filled correctly. Is there a way to correct this without changing the Joomla settings?
in the dynamic dropdown is must enter in the "Extra options extension" something otherwise the event is not fired. With the standard joomla settings we get an error and this is the cullprit of the funny html data in the dropdown box.
To elimate this we must change the followingin the " Joomla 'Global configuration" -> "Server" -> "Error reporting" to none.
Then the dropdown is filled correctly. Is there a way to correct this without changing the Joomla settings?
Hi rodiusd,
What exactly is the error message that gets thrown up? You should be able to see that in your browser web developer tools (on the Net tab in Chrome).
The image looks like a whole page is being returned and is being parsed as though it was an options list i.e. Picking out what is before and after the = signs.
Bob
What exactly is the error message that gets thrown up? You should be able to see that in your browser web developer tools (on the Net tab in Chrome).
The image looks like a whole page is being returned and is being parsed as though it was an options list i.e. Picking out what is before and after the = signs.
Bob
This topic is locked and no more replies can be posted.