Hi,
Thanks Brendan and Aby for the reply.
It was'nt working when I started writing this post then I tried 
some thing and it worked. I notice two things-
1. My browsers (NA 4.5 and IE 4.0) does'nt like the notation-
onClick = document.formName.elements[\"btCompany_onWebEvent(btCompany)\"].click(); 
return false;
It works when I write-
onClick = document.formName.elements[4].click(); return false;
It does'nt seem to recognize \".

2. If I put the working code in a function and call the function 
it does nothing. Wierd!

Any way atleast I have some thing working, thanks to you guys.

Vishal


"Mathew, Aby" <[EMAIL PROTECTED]> wrote:
>Hi Vishal,
>
>What you are missing is: forgetting to tell Him (the browser) not to pursue
>the Href.
>
>If you write a function myClickFunction which 'clicks' the button and then
>returns false,
>and if you change the Href extra  to 
>>>>onClick="return myClickFunction()" <<<
>the Href will not be pursued.
>
>You also have to make the change Brendan suggested:
>
>onClick="document.formName.elements[\"ButtonName\"].click();return false;"
>
>The button name is not what you name it.If your button is ButtonSave, the
>actual name will be soemthing like:
>"ButtonSave_onWebEvent(ButtonSave)" 
>
>Unfortunately, the browser may not obey the return false unless you put it
>in a function and call as described above.
>
>
>Regards,
>
>Aby
>
>
>
>> -----Original Message-----
>> From:        Johnston, Brendan   [SMTP:[EMAIL PROTECTED]]
>> Sent:        Wednesday, April 14, 1999 5:52 PM
>> To:  '[EMAIL PROTECTED]'; 'NetDynamics 4.x'
>> Subject:     Re: [ND] help on javascript
>> 
>> Sometimes the issues is that the button name string has is not legal.
>> In that case use onClick="document.formName.elements[\"Button
>> Name\"].click();return false;">
>> 
>> The overall approach you are using seems fine and has worked for us.
>> Does the button actually exist in the HTML, or just in ND?
>> 
>> Brendan Johnston
>> TeamND
>> 
>>      -----Original Message-----
>>      From:   [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
>>      Sent:   Wednesday, April 14, 1999 3:32 PM
>>      To:     [EMAIL PROTECTED]
>>      Subject:        [ND] help on javascript
>> 
>>      Hi Forum Pals,
>> 
>>      I have a question for javascript gurus, I wanna call the click
>> method of an ND button from the onClick event of a href, I tried following
>> things but none worked-
>> 
>>      1. onClick = "document.formName.buttonName.click()"
>>      2. Made a function that does the same thing as 1 and called the 
>>      function at onClick event of the href.
>> 
>>      Basically I want the webVars to be submitted onClick of the href,
>> with the above things it simply does nothing. I don't know what I am
>> missing, if any body knows please let me know.
>> 
>>      Thanks
>> 
>>      Vishal
>>      
>> _________________________________________________________________________
>> 
>>      For help in using, subscribing, and unsubscribing to the discussion
>>      forums, please go to:
>> http://www.netdynamics.com/support/visitdevfor.html
>> 
>>      For dire need help, email: [EMAIL PROTECTED]
>> _________________________________________________________________________
>> 
>> For help in using, subscribing, and unsubscribing to the discussion
>> forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
>> 
>> For dire need help, email: [EMAIL PROTECTED]

_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to