473,387 Members | 1,904 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,387 software developers and data experts.

Python CGI and Firefox vs IE

Hey y'all, this falls under the murky realm of HTML, CGI and
Python...and IE.

Python 2.4, using CGI to process a form.

Basically I've got 3 buttons. Here's the HTML code:

<form action='http://127.0.0.1/cgi-bin/server_status.py' method=post>
<button name='display' value='all,status' type='submit'>All
Servers</button>
<button name='display' value='wkpea1,status'
type='submit'>WKPEA1</button>
<button name='display' value='wknha2,status'
type='submit'>WKNHA2</button>
</form>
And the code that's messing things up:

fields = cgi.FieldStorage()

if fields.has_key('display'):
print fields['display']
which_server,which_display = fields['display'].value.split(',')
if which_server == 'all':
which_server = servers
else:
which_server = [which_server]
This program works fine under firefox. If, say, you clicked on the 1st
button, All Servers, you'd get this returned in the field['display']
variable

MiniFieldStorage('display', 'all,status')

Under Internet Explorer, this is what I get in field['display']:

[MiniFieldStorage('display', 'All Servers'),
MiniFieldStorage('display', 'WKPEA1'), MiniFieldStorage('display',
'WKNHA2')]
----

I see what's happening, but I'm at a loss to figure out what to do
about it. Any help would be appreciated.

thanks,

jason

Sep 7 '05 #1
3 1693
On Wed, 07 Sep 2005 10:50:15 -0700, Jason wrote:
Hey y'all, this falls under the murky realm of HTML, CGI and
Python...and IE.

Python 2.4, using CGI to process a form.

Basically I've got 3 buttons. Here's the HTML code:

<form action='http://127.0.0.1/cgi-bin/server_status.py' method=post>
<button name='display' value='all,status' type='submit'>All
Servers</button>
<button name='display' value='wkpea1,status'
type='submit'>WKPEA1</button>
<button name='display' value='wknha2,status'
type='submit'>WKNHA2</button>
</form>
And the code that's messing things up:

No, here you are wrong. IE doesn't work as expected with buttons.
See
http://www.solanosystems.com/blog/ar...utton-problem/

This has nothing to do with Python.
---
Stephan jason


Sep 7 '05 #2
> I see what's happening, but I'm at a loss to figure out what to do
about it. Any help would be appreciated.


Try giving the buttons different name attributes.

Sep 7 '05 #3
IE...<sigh>

Have to come up with a workaround, go back to the old <input>. I'm
about the only one who uses firefox in our facility.

Thanks for the reply and the link.

Sep 7 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: M.N.A.Smadi | last post by:
hi; i want to write a script to do the following: when using firefox to download a textfile, instead of saving it to the hard dist, i want to run a python script on it, and i want the python...
18
by: qwweeeit | last post by:
Hi all, when I moved from Windows to Linux I choosed Python as my language of reference and as GUI, Qt (not much investigated up to now). Till now I didn't regret but one thing: Python can't act...
7
by: James Stroud | last post by:
Hello, Does anyone know of an example, however modest, of a screenscraper authored in python? I am using Firefox. Basically, I am answering problems via my browser and being scored for each...
1
by: tinnews | last post by:
I'm running a python script via the apache ExtFilterDefine directive, it works basically as expected *except* that when I change the script apache/firefox continue to run the old version of the...
2
by: neeebs | last post by:
Hi, I'm not sure if this is a javascript problem per se, but here goes. I have an xsl document with a python function defined within a <script> block. Elsewhere in the xsl file, within a python...
2
by: Joe Goldthwaite | last post by:
I'm confused. (Not a new experience). I've got a web application running under Zope. I use the Wing IDE for testing and debugging. When trying to recreate problems that come up on the web, I...
0
by: Joe Goldthwaite | last post by:
Thanks Guilherme. That helped. I guess I was thinking that pysqlite would automatically come with some version of sqlite. The fact that it doesn't is what was causing me to get the strange...
3
by: Scott | last post by:
I have a requirement to control a firefox web browser from an external python program. The python program running under linux from a command shell needs to first find all open firefox web browser...
0
by: bruce | last post by:
hi mike.... you might look at/into selenium, or firewatir.... check the spellings! -peace -----Original Message-----
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...
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
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...
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...
0
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,...
0
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...

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.