Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Dont know how to do this:

 

I have a page with 2 panels on it. If I login with Mode1, Panel1 is displayed. If I login with Mode2, Panel2 is displayed.

 

I want to set foucs on a textbox that is displayed in EACH panel

 

For example, I have a textbox in Panel1 named txtIncid and one in panel2, named txtIncid8.

 

This is what I did but It doesnt work because I always pass it the same value:

<script LANGUAGE="JavaScript">
	 function setFocus(x)
           {
              
               if (x=="txtIncid"){
              document.Form1.elements[x].focus();
               }
               else{
               
               document.Form1.elements['txtIncid8'].focus();
                   }
              }
                      
        
	</script>

 

and then In the Body, I have this:


<body MS_POSITIONING="GridLayout" OnLoad="setfocus('txtIncid')">

 

any ideas?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...