last I knew javascript try-catch wasn't cross-browser... I think IE
allows it but Mozilla browsers tell you that you can't use the keyword
"try" when you attempt it. Or at least that was my experience
previously.

> Be careful with the private variables outside of your
> function scope.
> You might think you made them private, but in fact they
> are public
> because you have defined them outside the function. You
> have defined
> them as global variables now.

> I have enclosed the parts with try catch parts, which
> might help you
> finding out where it goes wrong.

> <script type="text/javascript">
>       function clientRecPop(i) {
>               if(parseInt(i) <= 0){
>                       alert('i contained is not a valid number');
>                       return;
>               }

>               try{
>               var clid =
> document.forms['clientSearch'].elements['client_id'+i];
>               var compName =
> document.forms['clientSearch'].elements['client_id'+i];
>               }catch(e){
>               alert('something went wrong in the first part, fields
> not existing etc.');
>               }

>               if(window.opener){
>                               try{
> window.opener.document.forms['NewJob'].elements['clientID'
> ].value =
> clid;

> window.opener.document.forms['NewJob'].elements['coName'].
> value =
> compName;
> }catch(e){
>               alert('something went wrong in the second part, fields
> not existing in opener window etc.');
>               }
>               }



>               //window.close()
> }

> </script>


s. isaac dealey   954.522.6080
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:206378
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to