On 4/27/05, Hansan <[EMAIL PROTECTED]> wrote: > 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 :)
Got it - I think :) # Create a link that passes the value of `variable' to script.py via # the id parameter. You may want to escape `variable' somehow # in case it contains spaces or something else that isn't valid. print '<a href=script.py?id="%s"> some text </a>' % variable # Create a hidden input variable named `eventid' that contains a value of # `variable_name' print '<input type=hidden name="eventid" value="%s">' % variable_name hth, jw -- http://mail.python.org/mailman/listinfo/python-list