FAQ
Dennis, Cameron,

You are absolutely right. I was not aware that the cgi was trying to open
the new browser on the server -I am a beginner with cgi, python and
javascript.

This simple javascript does the job perfectly:

window.open("http://www.google.com");

Thanks a lot,
Antonio


"Antonio Ceballos" <aceballos at gmail.com> escribi? en el mensaje
news:fhdhl4$ag0$1 at hefestos.uned.es...
Hello,

I am trying to open a URL on a new browser or new tab from an HTML page
created from a python cgi script. On Apache in my localhost, it works,
both with Internet Explorer and Firefox. However, when I upload the script
to a remote server, it does not. A 500 Internal Server Error is displayed
on the browser.

The (simplified) piece of code is as follows:

import webbrowser
webbrowser.open_new(http://www.google.com)

The server runs python 2.3. I am using python 2.5 in my localhost.

Can anybody figure out why this may be happening?

Cheers,
Antonio

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 3 | next ›
Discussion Overview
grouppython-list @
categoriespython
postedNov 14, '07 at 1:05a
activeNov 15, '07 at 12:48a
posts3
users2
websitepython.org

2 users in discussion

Antonio Ceballos: 2 posts Cameron Walsh: 1 post

People

Translate

site design / logo © 2022 Grokbase