logo       

Re: Help, Please: Can't Get a Hold of <input type=button ...>: msg#00027

lang.perl.modules.lwp

Subject: Re: Help, Please: Can't Get a Hold of <input type=button ...>

On Mon, 13 Sep 2004, Daniel E. Doherty wrote:
[...]
> Here is the javascript function that gets invoked:
> function FormSubmit(objForm)
> {
> var strVersion = new String(navigator.appVersion);
> var arrVersion = strVersion.split(" ");
> var intVersion = new Number(arrVersion[0]);
>
> objForm.BrowserName.value = navigator.appName;
> if (navigator.appName == "Netscape")
> {
> //alert("here");
> objForm.action = "NSPrint.asp";
> }
> objForm.submit();
> }
>
> One of the solutions you recommend is to do in python what the script
> does. It looks to me like this script just submits the form or prints
> for Navigator (though I don't know much about javascript). It would
[...]

The last line submits the form. The rest of it doesn't <wink>.

For example, objForm.action = "blah" sets the form element's action
attribute to "blah", thus causing objForm.submit() to submit to a
different URL. Google for "HTML 4.01 spec", and read the documentation
for the Form element's action attribute. Then try looking at the HTML
that contains the JavaScript function above, and figure out what
objForm.BrowserName.value = "whatever" does (search for "BrowserName" in
the HTML).


John



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise