473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Form will 'fire' only in IE??

scubak1w1
Hello,

I posted this in the HTML forum, but it was suggested I post it over here as well by a moderator.
I have a form that will not 'fire' in non-IE browsers?? I have poked and poked at the code and can not find why.

The AJAX changes the query button in non-IE browsers, at least in the sense it is not opaque anymore, the 'title' check changes, etc - it just doesn't "fire" when you click the icon/image in Mozilla, etc but DOES in Internet Explorer...

That is
[PHP]if(array_key_exists('_submit_check', $_POST))[/PHP]
is never to be true in non-IE browsers, but works just fine in IE???

Note that I have ANOTHER form on another page where the code below is the same (triple checked side-by-side) BUT it DOES work in Firefox, etc - suggesting that the issue on the page that doesn't work is not in this part of the code... but have no idea where!!!

So basically - any suggestions on to how to troubleshoot this?? What should I be looking for?

TIA!!
Greg...

--------------------------------------------
HTML/PHP page for from, trimmed and munged a little

[HTML]
<!DOCTYPE htm
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" xml:lang="en" lang="en">

<html>

<head>

<title>[munge] DMS Portal - Text Data Query - Hydraulic Testing</title>

<!-- add the 'standard' HEADER portions-->
<?php
include("standard_format_items/header_portions.php");
?>

<!-- the 'entry' to the code to populate the 'chained' pulldowns for the hydraulic testing query parameters, via AJAX -->
<script language="JavaScript" src="AJAX/hydraulic_test_query/hydraulic_test_pulldowns_select.js"></script>

</head>

<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#0000ff">

<!-- add the 'standard' TOP logos, navigation bar, etc-->
<?php
$page_status = "&beta;"; // adjust the page 'status' as relevant - alpha, beta, or nbsp
include("standard_format_items/top_navigation_bar.php");
?>

<br />

<table align="center" frame="box" rules="none" cellpadding="10" cellspacing = "0" width="800">
<tr class="header">
<td align="center" style="font-size:14pt; font-weight:bolder">
HYDRAULIC TESTING DATA - 'Text' Query Functionality
</td>
<td align="center" width="100">
<img src="images/icon_hydraulic.gif" alt="[hydraulic testing icon]">
</td>
</tr>
</table>

<?php

//SET UP THE 'GENERIC' DATABASE CONNECTION
$db_connect=pg_pconnect("host=[munge] dbname=[munge] user=[munge] password=[munge]") or die(pg_last_error($db_conn));

//SUM of SITE/LOCATION/s that that have HYDRAULIC TESTING data ('raw' and maybe analysis results); concatentate the site + location data for user 'comprehension' on the site and to simply the 'coding'
$SQL_Query = " SELECT (d_site.site_id || ' / ' ||d_location.location_id) AS label
FROM d_hydraulictest INNER JOIN (d_bore INNER JOIN (d_site INNER JOIN d_location ON d_site.site_id = d_location.site_id) ON (d_location.location_id = d_bore.location_id) AND (d_bore.location_id = d_location.location_id)) ON (d_hydraulictest.bore_id_test = d_bore.bore_id) AND (d_hydraulictest.bore_id_test = d_bore.bore_id)
GROUP BY d_site.site_id, d_location.location_id
ORDER BY d_site.site_id, d_location.location_id";
$query_result=pg_query($db_connect, $SQL_Query);
$row_counter_label=0;
while($row_data=pg_fetch_array($query_result)) {
$row_counter_label += 1;
$ary_query_result_SUM_site_plus_loc[$row_counter_label] = $row_data['label'];
}

?>

<br />

<!-- PULLDOWN/SELECTION TABLE -->
<table frame="box" rules="all" cellpadding="10" cellspacing="0" align="center">

<form action="<?PHP print $_SERVER['PHP_SELF']; ?>" method="post" name="data_select">

<input type="hidden" name="_submit_check" value="1" />

<tr class="header_select" style="font-weight:bold" valign="middle">
<td align="center">
<div id="site_location_title">
<div style="color:red">
Select<br />SITE / LOCATION
</div>
</div>
</td>
<td align="center">
<div id="test_date_start_title">
<div style="color:gray">
Select<br />DATE of<br />TEST START
</div>
</div>
</td>
<td align="center">
<!-- no 'title' needed -->
</td>
</tr>

<tr valign="middle">
<td>
<!-- site/location selection -->
<select name="site_plus_location" size="4" onchange="fun_get_test_dates(this.value)">
<?php
foreach($ary_query_result_SUM_site_plus_loc as $option_string) {
print "<option value=\"$option_string\">$option_string</option>";
}
?>
</select>
</td>
<td align="center">
<div id="test_dates">
<select size="4" style="color:gray; font-variant:italic">
<option>{select the site / location}</option>
</select>
</div>
</td>
<td align="center">
<div id="query_execute_icon">
<img src="images/icon_search2.gif" alt="INACTIVE: Submit Query" title="Select EVERY PARAMETER/s to Allow Query Execution" style="filter:alpha(opacity=35);-moz-opacity:0.35;opacity:0.35" />
<div style="font-style:italic; font-size:7pt; color:lightgray">
<br />Submit Query
</div>
</div>
</td>
</tr>

</form>

</table>

<?php

//ONCE PARAMETERS HAVE BEEN SELECTED BY THE USER, GET THE VARIOUS DATASETS FROM THE DATABASE AND SHOW IN THE THREE TABLES
if(array_key_exists('_submit_check', $_POST))
{//USER SELECTION HAS BEEN MADE

// [snipped things to do]
}

//DELETE ME - 'TEST CODE'
if($form_triggered) {
print "<script language=\"javascript\">alert('Form Triggered')</script>";
}
else
{
print "<script language=\"javascript\">alert('Form NOT Triggered')</script>";
}

?>

<br />

<!-- [snip the table/s to display the results] -->

<br />

<!-- add the 'standard' BOTTOM logos, navigation bar, etc-->
<?php
include("standard_format_items/bottom_navigation_bar.php");
?>

</body>

</html>
[/HTML]

--------------------------------------------

With the div populated by AJAX as follows, in hydraulic_test_pulldowns_select.js:

Expand|Select|Wrap|Line Numbers
  1. //...
  2. document.getElementById('query_execute_icon').innerHTML = xmlHttp.responseText;
  3. //...
------
PHP for the innerResponse text:

[PHP]

//HYDRAULIC TESTING DATA QUERY - ALLOW/'ACTIVATE' QUERY EXECUTE ICON (sic)

//the 'point' of the page, a simple change of the query's submit buttons/icon parameters
$output = "<input type=\"image\" value=\"search\" name=\"query_with_parameters\" src=\"images/icon_search2.gif\" alt=\"Submit\" title=\"Return Data, from/with selected parameter/s selection\" class=\"toggleopacity\" />";
$output .= "<br />";
$output .= "<div style=\"font-style:italic; font-size:7pt\"><br />Submit Query</div>";

//the 'return'
print $output;

[/PHP]
Apr 1 '08 #1
3 1619
Atli
5,058 Expert 4TB
Hi.

Been trying to understand the problem...

Basically, you have a form.
You don't want the submit button of this form to be enabled until the form has been filled out?

Once the form has been filled out, you enabled the submit button by calling a static text from a PHP document via an Ajax call... which replaces a <img> of the disabled button with a <input> tag that should be used to submit the form?

If this is true, the Ajax call is unnecessary. You could simply replace it with a Javascript function that exchanges the <img> for the <input>.

Or even better, you could simply have the <input> there disabled, and have the Javascript enable it, changing the style as well to make it visible.

Am I missing something?
Apr 2 '08 #2
nope... you have it right... :-)

On another form/page using essentially the same code (for the form at least), I sequentially populate about 12 different 'chained' <select>s from the PostgreSQL database using AJAX and based on the user's response... this '12-chain' (sic) works in IE and non-IE browsers... - this is then used to get 'live' all the data from the database based on these 12 parameters (analytical chemistry results...)

when I made this form, and the data it displays in tables below, for expediency and consistency I basically copied the '12-chain' form, adjusted it for this '2-chain'... (SQL strings, tabulated output, etc) - as mentioned, works in IE and not in non-IE browsers...

I used AJAX as I know little JS (yep, a relative newbie...) - and had mashed up (sic) this approach.... and it was working on the previous form as expected...

I would give you a link to the working '12-chain' form as it is 'live' - but it needs to be behind an https:// as it is sensitive client data :-(

Can I bother you to provide a couple of quick URLs of examples of your suggested approach? Or some key words I should Google?

Thank you in advance:
GREG...
Apr 2 '08 #3
P.S. is there a 'trick' to see what the code on a page looks like on the client side as AJAX adjusts it? That is, if you 'view source' in the browser you seem to see just the original page as 'sent' by the web server... it would be good to see if in fact the <input> tag is being updated "correctly" in non-IE browsers...
Apr 2 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Building Blocks | last post by:
Hi, All I need is a simle calculate form script which contains this: A script that can handle text input, radio buttons, checkboxes, and dropdowns. Each one of these variables will contain a...
9
by: MLH | last post by:
If you have these lines in code on MyForm1... DoCmd OpenForm "MyForm2`" MsgBox "I opened MyForm2" Is it #ALWAYS# true that all form events on MyForm2 will occur before the MsgBox statement...
13
by: Manuel Lopez | last post by:
I have a puzzling form timer problem that I didn't experience prior to Access 2003 (though I'm not sure access 2003 is to blame). Here's the situation: a computer has two access 2003 databases on...
9
by: Susan Bricker | last post by:
I am currently using the OnDirty event of a Form to detect whether any fields have been modified. I set a boolean variable. Then, if the Close button is clicked before the Save button, I can put...
15
by: Billy | last post by:
Anyone know if this a bug in VB.NET 2002 and how to overcame that situation? I have a MDI form from where I call MDI child form like that: Dim frm As New frmChild() frm.MdiParent = Me...
27
by: Scott | last post by:
I've been trying to come up with a way to ensure user input is coming from the form on my site, and not auto-submitted from elsewhere, and I don't want to use the "enter the code shown in the...
7
by: Jayyde | last post by:
Is there any way to accomplish this? The forms _Load event fires off several other small ones that I'd like to track time for. I can't get either the Mdi Parent form's timer _Tick event or the...
2
by: Joergen Bech | last post by:
Hope someone has a solution or some suggestions for this. This cannot be right?!? Problem: I have multiple non-modal forms open at the same time. One or more of these forms have a...
4
by: robertallenpayne | last post by:
I have been asked to develop an application in Access for work. This application must have a simple user interface because the folks using it are not "database people" - their words, not mine. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
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...
0
marktang
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.