Problem with sending a variable(python) while using html
Hansan
none
Wed Apr 27 16:40:18 EDT 2005
Hi.
Sorry forgot to post a "non-working" example
That could be
print "<a href=script.py?id=", variable, "'>", "some text" <input
type=hidden name="eventid" value='''+str(variable_name)+'''>'''</a>"
I know that it isnt very creative, but I am having a hard time getting html
to work together with python.
When the link "some text" is clicked I want to send both the first variable
called variable and the second one(variable_name) to the script (script.py)
Hope that makes some sense :)
"Jaime Wyant" <programmer.py at gmail.com> wrote in message
news:mailman.2596.1114630252.1799.python-list at python.org...
On 4/27/05, Hansan <none at bag.python.org> wrote:
> Hi all.
>
> I am working on a webpage where I use python and html.
>
> When I want to send one variable to a new script/page I use the following
> code:
> 0) print '''<input type=hidden name="eventid"
> value='''+str(variable_name)+'''>'''
>
> This works fine, the problem occurs when I want to send a variable to a
> page
> while using a 1)meta refresh or a 2)Href.
> 1) and 2) works fine as they are but not when I try to send the variable
> with them.
>
> The working version of 1) and 2) could look like
> 1) print ''<META HTTP-EQUIV="Refresh" CONTENT="0;URL=page xxx">'''
> 2) print "<a href='page xxx?id=", variable, "'>", "some text", "</a>"
>
What exactly does the "non-working" version look like? Perhaps a
snippet of broken code would be helpful here?
jw
More information about the Python-list
mailing list