[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4284: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4286: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4287: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4288: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
www.dhtmlgoodies.com • View topic - AJAX-Chained Select Box - Error in MOZILLA
Advertisement

AJAX-Chained Select Box - Error in MOZILLA

Moderators: Calcifer, slothy

AJAX-Chained Select Box - Error in MOZILLA

Postby liyajpm » Tue Apr 03, 2007 5:25 am

Hi, I am very much new in AJAX, I used a sample AJAX script (ajax-chained-select) from the site and customized it to fit for my requirement and used in my code, this is working absolutely fine with IE, but when the same thing opened in Mozilla, it throw an error (document.getElementById("CourseDateID") has no properties in the file dynamic_list.php - line no: 403), please help me out dear friends. I attach the code also along with this.

I need to fetch the and display all the CourseDates in the second select box (Name : CourseDateID) on the change of the first select box (Name: CourseID)

---------------- IN THIS FILE, I HAVE INCLUDED THE AJAX SRIPT -------
<script type="text/javascript" src="js/ajax.js"></script>
<script type="text/javascript">

function createCertificates()
{
var obj = document.getElementById('CourseDateID');
//alert (ajax.response)
eval(ajax.response); // Executing the response from Ajax as Javascript code
}

var ajax = new sack();

function getCertificateList(sel)
{
var CourseID = sel.options[sel.selectedIndex].value;
//alert(CoachTypeCode)


document.getElementById('CourseDateID').options.length = 0; // Empty certificate select box

if(CourseID.length>0){
ajax.requestFile = 'getCourseDates.php?CourseID='+CourseID;
// Specifying which file to get
ajax.onCompletion = createCertificates; // Specify function that will be executed after file has been found
ajax.runAJAX();
// Execute AJAX function
}
}
---------------------------------------------------------------------
my php file is : getCourseDates.php?CourseID='+CourseID
-------------------------------------------------------------------------
<?php
include "../include/inc.mysql.php";
if( isset($CourseID) && ($CourseID != "-") ){
$sql="select ID,concat(date_format(DateStart,'%d %b %Y'),' - ',date_format(DateEnd,'%d %b %Y')) as CourseDates from CourseDate where CourseID=$CourseID order by DateStart" ;
$sql_query=mysql_query($sql) or die ("error in fetching curresponding course dates:".mysql_error());

echo "obj.options[obj.options.length] = new Option(\"-Choose One-\",\"0\");\n" ;
while ($CourseDateDetails = mysql_fetch_array($sql_query)){
$CourseDateID=$CourseDateDetails["ID"] ;
$CourseDates=$CourseDateDetails["CourseDates"] ;
echo "obj.options[obj.options.length] = new Option(\"$CourseDates\",\"$CourseDateID\");\n" ;
}
}

?>

----------- please tell me where I went wrong...

Thank you very much in advance.
Last edited by liyajpm on Tue Apr 03, 2007 9:37 am, edited 1 time in total.
liyajpm
 
Posts: 5
Joined: Tue Apr 03, 2007 5:11 am
Location: KL

Postby liyajpm » Tue Apr 03, 2007 9:31 am

liyajpm
 
Posts: 5
Joined: Tue Apr 03, 2007 5:11 am
Location: KL

Postby liyajpm » Tue Apr 03, 2007 9:44 am

liyajpm
 
Posts: 5
Joined: Tue Apr 03, 2007 5:11 am
Location: KL

Thanks a lot Man

Postby liyajpm » Tue Apr 03, 2007 10:05 am

liyajpm
 
Posts: 5
Joined: Tue Apr 03, 2007 5:11 am
Location: KL

Previous

Return to General questions regarding AJAX scripts

Who is online

Users browsing this forum: No registered users and 13 guests

cron