473,587 Members | 2,505 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form will 'fire' only in IE??

scubak1w1
53 New Member
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_ex ists('_submit_c heck', $_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.dt d">
<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("standa rd_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="JavaS cript" src="AJAX/hydraulic_test_ query/hydraulic_test_ pulldowns_selec t.js"></script>

</head>

<body bgcolor="#fffff f" 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("standa rd_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_err or($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.lo cation_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.loc ation_id = d_bore.location _id) AND (d_bore.locatio n_id = d_location.loca tion_id)) ON (d_hydraulictes t.bore_id_test = d_bore.bore_id) AND (d_hydraulictes t.bore_id_test = d_bore.bore_id)
GROUP BY d_site.site_id, d_location.loca tion_id
ORDER BY d_site.site_id, d_location.loca tion_id";
$query_result=p g_query($db_con nect, $SQL_Query);
$row_counter_la bel=0;
while($row_data =pg_fetch_array ($query_result) ) {
$row_counter_la bel += 1;
$ary_query_resu lt_SUM_site_plu s_loc[$row_counter_la bel] = $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_sele ct">

<input type="hidden" name="_submit_c heck" value="1" />

<tr class="header_s elect" style="font-weight:bold" valign="middle" >
<td align="center">
<div id="site_locati on_title">
<div style="color:re d">
Select<br />SITE / LOCATION
</div>
</div>
</td>
<td align="center">
<div id="test_date_s tart_title">
<div style="color:gr ay">
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_g et_test_dates(t his.value)">
<?php
foreach($ary_qu ery_result_SUM_ site_plus_loc as $option_string) {
print "<option value=\"$option _string\">$opti on_string</option>";
}
?>
</select>
</td>
<td align="center">
<div id="test_dates" >
<select size="4" style="color:gr ay; font-variant:italic" >
<option>{sele ct the site / location}</option>
</select>
</div>
</td>
<td align="center">
<div id="query_execu te_icon">
<img src="images/icon_search2.gi f" alt="INACTIVE: Submit Query" title="Select EVERY PARAMETER/s to Allow Query Execution" style="filter:a lpha(opacity=35 );-moz-opacity:0.35;op acity: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_ex ists('_submit_c heck', $_POST))
{//USER SELECTION HAS BEEN MADE

// [snipped things to do]
}

//DELETE ME - 'TEST CODE'
if($form_trigge red) {
print "<script language=\"java script\">alert( 'Form Triggered')</script>";
}
else
{
print "<script language=\"java script\">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("standa rd_format_items/bottom_navigati on_bar.php");
?>

</body>

</html>
[/HTML]

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

With the div populated by AJAX as follows, in hydraulic_test_ pulldowns_selec t.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_wi th_parameters\" src=\"images/icon_search2.gi f\" alt=\"Submit\" title=\"Return Data, from/with selected parameter/s selection\" class=\"toggleo pacity\" />";
$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 1624
Atli
5,058 Recognized Expert Expert
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
scubak1w1
53 New Member
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
scubak1w1
53 New Member
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
9978
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 number. That number will appear in a seperate box at the bottom. So basically whatever you choose has a corresponding number associated with it...
9
3099
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 in MyForm1 is processed? Is there ever an exception that might create
13
7464
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 it, a frontend and a backend. Case 1: If vba code on the frontend updates many rows (360,000) on the backend, a form's timer event (from the...
9
15845
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 up a message on the screen that will tell the user that "Data has been changed, do you wish to Save the record before Closing this window?" I...
15
2909
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 frm.Show() On that child form I have some textboxes. When form show up Leave event
27
2579
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 image" method. I know the $_SERVER contents can be spoofed, so I thought of doing something similar to this: <?php session_start(); $code =...
7
8203
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 child form that I'm opening's _Tick to actually fire off. Any help any of you gurus can give me will be much appreciated :). -Jayyde
2
7174
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 ToolStrip, each of which has one or more ToolStripButtons.
4
2733
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. One of the "screens" they want to see will display a progress bar. I created the "screen" in a form. I do not currently have it bound to any data...
0
7923
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7852
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8216
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8349
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8221
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6629
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5395
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.