A ClientForm Question

narke steven at lczmsoft.com
Fri Apr 1 12:36:24 CEST 2005


Does anyone here use ClientForm to handle a HTML form on client side?

I got a form, within which there is a image control, it direct me to
another page if i use mouse click on it.  the code of the form as
below:

<form name="ZoomControl1:Form1" method="post"
action="CDocZ_MAG.aspx?Stat=DocZoom_DocZoom&amp;&amp;E=29YL53ZJBIEZ&amp;DT=ALB&amp;Pass=&amp;Total=104&amp;Pic=1&amp;o="
id="ZoomControl1_Form1" onkeydown="JavaScript:Navigation_ie();">

...

<input type="image" name="ZoomControl1:Imagebutton2" onclick="if
(typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); "
language="javascript" id="ZoomControl1_Imagebutton2"
src="../Images/Btn_GoImage.gif" border="0" />&nbsp;

...

</form>

So write below code to 'click' the image button,

    forms = ParseResponse(urlopen(url))

    form = forms[0]
    urlopen(form.click("ZoomControl1:Imagebutton2"))

unfortunatly, however, when the code run, it just got a page which is
not the one i desired ( i actually wish to get the same page as i
'click' the button).  I guess that is "onclick=" statement cause
something weird, but I do not understand it.  And, in the source
containing the form, i found nowhere the Page_ClientValidate() resides.

What's wrong?

-
narke




More information about the Python-list mailing list