This code works in Chrome and pulls a second drop down, but it will not work in IE6, (I dont have IE7/8 to check right now, but can later) and it works in FF, in IE it doesn't do anything at all.
Thanks for any help!
php code to push data to page: - <?php
-
$q=$_GET["q"]; //number
-
$blown = explode(',',$q);
-
$q = $blown[0];
-
$appl = $blown[1];
-
-
include "/home/advent1/public_html/secure/connect.php";
-
$clients= "'$_SESSION[group2]'";
-
-
-
-
-
-
-
?>
-
-
<select name="lookupanswers">
-
<option></option>
-
<?php
-
$i=1;
-
while ($i <= '10') {
-
$p="appl_quest{$i}_yn";
-
$m="appl_drop_{$q}_{$i}";
-
$n="quest{$i}_yn";
-
$sqlappl = "SELECT appl from client_table where appl = {$blown[1]}";
-
$resultappl = mysql_query($sqlappl) or die(mysql_error());
-
$appl = mysql_result($resultappl, 0);
-
-
$sqlapplquest = "select {$m} from lookup_table where appl = {$appl}";
-
$resultapplquest = mysql_query($sqlapplquest) or die(mysql_error());
-
$applquest = mysql_result($resultapplquest, 0);
-
-
if ($applquest == '') {
-
} else {
-
?>
-
<option value="<?php echo $i; ?>"><?php echo $applquest; ?></option>
-
<?php
-
}
-
$i++;
-
}
-
echo $sqlapplquest;
-
?>
Javascript code to make the ajax object. - var xmlhttp;
-
-
function showUser(str,appl)
-
{
-
xmlhttp=GetXmlHttpObject();
-
if (xmlhttp==null)
-
{
-
alert ("Browser does not support HTTP Request");
-
return;
-
}
-
var url="getanswer.php";
-
url=url+"?q="+str;
-
url=url+"&sid="+Math.random();
-
xmlhttp.onreadystatechange=stateChanged;
-
xmlhttp.open("GET",url,true);
-
xmlhttp.send(null);
-
}
-
-
function stateChanged()
-
{
-
if (xmlhttp.readyState==4)
-
{
-
document.getElementById("txtAnswers").innerHTML=xmlhttp.responseText;
-
}
-
}
-
-
function GetXmlHttpObject()
-
{
-
if (window.XMLHttpRequest)
-
{
-
// code for IE7+, Firefox, Chrome, Opera, Safari
-
return new XMLHttpRequest();
-
}
-
if (window.ActiveXObject)
-
{
-
// code for IE6, IE5
-
return new ActiveXObject("Microsoft.XMLHTTP");
-
}
-
return null;
-
}
part of page its supposed to be updating. - Question:
-
<select name="lookups" onchange="showUser(this.value)">
-
<option></option>
-
<?php
-
$i = '1';
-
while ($i<'10') {
-
$sqlapplquest = "select appl_drop_{$i} from appl_table where appl = {$appl}";
-
$resultapplquest = mysql_query($sqlapplquest) or die(mysql_error());
-
$applquest = mysql_result($resultapplquest, 0);
-
-
if ($applquest != '') {
-
?>
-
<option value="<?php echo $i; ?>,<?php echo $appl; ?>"> <?php echo $applquest; ?> </option>
-
<?php
-
}
-
$i++;
-
}
-
?>
-
</select> Answered:<d id="txtAnswers"><select></select></d>
Thanks again!
6 4460
found the problem, <d> isn't supported in IE6...thanks guys.
Its sloppy at best, but i ran outta other tags that i could use there, div kept putting it on the line under.
Its cool, no worries, its really not what ANYONE should use, and i'm not defending it. but it DID work in FF and Chrome, and not in IE, and that should be pointed out. Thats all.
Did you try a <span>? Div is a block element, Span is in-line
@oneadvent
it will work, as in stuff will show up, but it doesn't respond to CSS tag selectors, or have as many dom bindings like lang and name.
this should be fixed in the next version of IE.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: dondraper |
last post by:
I have an application that uses a popular but simple set of JavaScript
routines that implement an AJAX call used to populate a drop-down. It
works for thousands of user but I have one customer...
|
by: Ivan Marsh |
last post by:
Hey Folks,
I'm having a heck of a time wrapping mind around AJAX.
Anyone know of a simple, straight-forward example for pulling a simple
query from mysql with PHP using AJAX?
As I...
|
by: www.web20developers.com |
last post by:
http://www.web20developers.com
http://www.web20developers.com/index.php?option=com_content&task=view...
Ajallerix : AJAX, simple, fast Web image gallery demo ; at Novell
AJAX -...
|
by: brakai295 |
last post by:
Hi there,
I need someone to customise an autocompletion AJAX script a little bit.
This free script here (demo | info & download) offers you auto-completion when typing in a country's name.
I...
|
by: moltendorf |
last post by:
I have created a little chat application that seems to work 100% on Mozilla Firefox, Google Chrome, and Safari, (tried it in Opera, and it seems to work, but the cookies are screwing everything up;...
|
by: mike57 |
last post by:
The minimal AJAX script below works in Firefox, but not in IE, Opera, or Chrome. I could use some suggestions or referrals to resources that will help me get the script working in other browsers.
...
|
by: fkhowaja |
last post by:
i want to show the property details and there status (APPROVED, REJECTED, PENDING) the whole result is coming through ajax now i want that if i click on Approved icon or Pending icon or Rejected icon...
|
by: thatcollegeguy |
last post by:
Below are my 3php and 2js files.
I create a table using ajax/php and then want to change the values in the tables add(+ number for teamid) id's for each specific td in the table. I don't know...
|
by: bennettj |
last post by:
Hello i'm relatively new to web programming and i have been giving the task of moving one of my VB programs over to a web format. I generally use google chrome and that has been what i've been...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |