Hi Marc,

There is no exception from that.  Also, wrapping the js code in a
function and calling this function in the href does not solve the
problem.

Below is the pertinent HTML snippet for the problematic link for the
Canoo tests.

Any other suggestion to re-solve that?

Thanks,

-hoang

============================================================

<head>
    <script language="JavaScript">
        // Returns current client time in milliseconds
        function getClientTime() {
            curDate = new Date();
            return curDate.getTime();
        }

        function doFormOnSubmit(field) {
            field.value = getClientTime();
            return true;
        }
        function doFormSubmit(form) {
            form.onsubmit();
            form.submit();
        }
    </script>
</head>

<body>

<form name="assignTokenForm" method="POST"
        action="/admin/um/assignToken.ua"
        onsubmit="return
doFormOnSubmit(this.elements['find.clientTime'])">
        <input type="hidden" name="find.clientTime" value="0"/> </form>
<a href="javascript:doFormSubmit(document.assignTokenForm)"
        id="assignToken" class="bigLink">Assign Token</a>
      - Assign token to user.
 
</body>

============================

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marc Guillemot
Sent: Monday, March 06, 2006 5:15 AM
To: [EMAIL PROTECTED]
Subject: Re: [Webtest] Does 'clickLink' work with <a
href="javascript:document.assignTokenForm.onsubmit();document.assignToke
nForm.submit()" ???

Hi Hoang,

can you provide the exception you get?

What about wrapping your js code in a function and calling this function
in the href?

Marc.

Nguyen, Hoang wrote:
> Hello Everyone,
> 
>  
> 
> With the following JavaScript:
> 
>  
> 
> <a href="javascript:document.assignTokenForm.submit()"
> 
> id="assignToken" class="bigLink">Assign Token</a>
> 
>  
> 
> The following Canoo step works just fine.
> 
>  
> 
> <clickLink stepid="click the Assign Token link"
> 
>            save="${output.assignToken}/begin-"
> 
>            htmlid="assignToken"/>
> 
>  
> 
>  
> 
> After changing the JavaScript to:
> 
>  
> 
> <a
>
href="javascript:document.assignTokenForm.onsubmit();document.assignToke
nForm.submit()"
> 
>  id="assignToken" class="bigLink">Assign Token</a>
> 
>  
> 
> That same Canoo step does not work any more.  In fact, clicking on the
> link would fail to advance to the next page.
> 
>  
> 
> How can I get around with that?
> 
>  
> 
> Thank you very much!
> 
>  
> 
> -hoang
> 
>  
> 

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to