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="ZoomContr ol1:Form1" method="post"
action="CDocZ_M AG.aspx?Stat=Do cZoom_DocZoom&a mp;&E=29YL5 3ZJBIEZ&DT= ALB&Pass=&a mp;Total=104&am p;Pic=1&o="
id="ZoomControl 1_Form1" onkeydown="Java Script:Navigati on_ie();">
....
<input type="image" name="ZoomContr ol1:Imagebutton 2" onclick="if
(typeof(Page_Cl ientValidate) == 'function') Page_ClientVali date(); "
language="javas cript" id="ZoomControl 1_Imagebutton2"
src="../Images/Btn_GoImage.gif " border="0" />
....
</form>
So write below code to 'click' the image button,
forms = ParseResponse(u rlopen(url))
form = forms[0]
urlopen(form.cl ick("ZoomContro l1: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_ClientVali date() resides.
What's wrong?
-
narke
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="ZoomContr ol1:Form1" method="post"
action="CDocZ_M AG.aspx?Stat=Do cZoom_DocZoom&a mp;&E=29YL5 3ZJBIEZ&DT= ALB&Pass=&a mp;Total=104&am p;Pic=1&o="
id="ZoomControl 1_Form1" onkeydown="Java Script:Navigati on_ie();">
....
<input type="image" name="ZoomContr ol1:Imagebutton 2" onclick="if
(typeof(Page_Cl ientValidate) == 'function') Page_ClientVali date(); "
language="javas cript" id="ZoomControl 1_Imagebutton2"
src="../Images/Btn_GoImage.gif " border="0" />
....
</form>
So write below code to 'click' the image button,
forms = ParseResponse(u rlopen(url))
form = forms[0]
urlopen(form.cl ick("ZoomContro l1: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_ClientVali date() resides.
What's wrong?
-
narke
Comment