473,327 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

using focus() in navigation between frames.

Could somebody help me ? I have a left frame and right frame in a page. There is a form in right frame which has number of text box, checkbox, radio button, some static text's. For every input item (and for some static text too), I have link in left frame.

When I click in the left frame, I called a function like right frame.formName.item.focus() and cursor is placed in the input item of right frame. But this works only for the elements with focus() method. But I need to show the input item ( for radio, check box also ) , I have to show in right screen when the user clicks in the left screen. And I understand we can call focus() only for element in which we can place cursor.

So what I need is when I click the link in the right screen, the corresponding item ( whatever it is, radio, check or static text too) should be displayed (focussed!?) in the right screen.
Aug 17 '07 #1
5 2079
acoder
16,027 Expert Mod 8TB
Post your code.

You can give focus to radio buttons and check boxes, e.g. see link.
Aug 17 '07 #2
Post your code.
You can give focus to radio buttons and check boxes, e.g. see link.

Yes. This is how i set focus for radio and check box. But as I mentioned, i need to focus ( not exactly focus. Jus to display in screen) for some static text too.

Here is my code.

Expand|Select|Wrap|Line Numbers
  1. function showChapter(chapterName) {
  2. /* THIS METHOD IS USED TO DISPLAY AND FOCUS SELECTED CHAPTER */
  3.  
  4. var elemArray=document.getElementsByName(chapterName);
  5. if(elemArray!=null) {
  6.     for(var i=0;i<elemArray.length;i++) {
  7.         if(elemArray[i].type=="text" || elemArray[i].type=="checkbox" || elemArray[i].type=="radio"  || elemArray[i].type=="textarea" ) {
  8.                 elemArray[i].focus();
  9.                 break;
  10.         }
  11.     }
  12. }
  13. else {
  14.     //no such element
  15. }
  16. }
  17.  
  18. /*every chapter is an element in right side .That may be any input type or even 
  19. a static text.
  20. */
  21.  
My main issue is I have to display static text also.
Aug 17 '07 #3
acoder
16,027 Expert Mod 8TB
What does the static text look like? Give an example.
Aug 17 '07 #4
What does the static text look like? Give an example.
actually right frame content is generated by XSL. It looks like something below :

Expand|Select|Wrap|Line Numbers
  1. <section id="1-1-1" name="Name">
  2. <format type="textbox" maxlen="32" />
  3. </section>
  4.  
  5. <section id="1-1-2" name="Address">
  6. <format type="textarea" maxlen="70" />
  7. </section>
  8.  
  9. <section id="1-1-3" name="Sex">
  10. <format type="radio button" value="male,female"/>
  11. </section>
  12.  
  13. <section id="1-1-4" name="Fill below sections">
  14. <format type="label" value="All inputs are mandatory"/>
  15. </section>
After generating as HTML:

Expand|Select|Wrap|Line Numbers
  1. Name :<input type="text" name="1-1-1" > <br/>
  2.  
  3. Address :<textarea name="1-1-2"></textarea> <br/>
  4.  
  5. Sex :<input type="radio" name="1-1-3" >male <br/>
  6.         <input type="radio" name="1-1-3" >female<br/>
  7.  
  8. Fill below sections <br/>
  9. All inputs are mandatory <br/>
.................


If it is required, I can place this label inside a div tag or something, since I need to display while I click in left frame. ( Display in the sense, Assume section's 1 to 10 are visible in right screen. I click left frame link for 20th section, which is a label/static text in the right frame and it should be scrolled up in the screen ).
Aug 18 '07 #5
acoder
16,027 Expert Mod 8TB
If it is required, I can place this label inside a div tag or something, since I need to display while I click in left frame. ( Display in the sense, Assume section's 1 to 10 are visible in right screen. I click left frame link for 20th section, which is a label/static text in the right frame and it should be scrolled up in the screen ).
Just give the label a name: [HTML]<a name="#label">[/HTML] and link to it instead of trying to focus.
Aug 18 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Craig Bates | last post by:
Hi all I am designing a website for disabled football supporters and because of this, I obviously must consider accessibility to blind users whilst I am producing it - as they are one of the...
1
by: Robert Dickow | last post by:
Here's an interesting problem: When Netscape Nav plays an embedded sound, the current window will lose focus. Specifically, a user may be typing into a text input field, but an embedded sound in...
2
by: your name here | last post by:
I've been trying to get the scrollby javascript feature to scroll through frames. My end goal is to make my own scroll buttons to use for navigation through the frame but I figured I would start...
0
by: Jason Rodman | last post by:
I have been working on a web app that uses IFrames for our edit screens. A main window contains static information, while an IFrame contains the editable page. I use javascript from the outer page...
6
by: Mike | last post by:
I have a few textbox controls that have autopostback so that when they loose focus they update a label control that shows the count of characters in their respective text control. This works fine,...
4
by: Sandy.Pittendrigh | last post by:
I don't want to get into a frames discussion here. We all know they have numerous drawbacks, especially with search engine visibility. (Google, ironically, uses framesets for displaying individual...
10
by: EA | last post by:
I am sure I must be missing something about building navigation bars with CSS. Yes it is a very clever and efficient way to format navigation structures on simple one navigation level webs, i.e....
2
by: rn5a | last post by:
Please have a look at the image at the URL given below: http://rn5a.brinkster.net/Template.gif I would like to use that image as a template for all the ASP pages in a website. Note that though...
3
by: swetha123 | last post by:
hello, I don't know how to use cookies please help me in this I am using the dream weaver cs4 I designed the navigation bar to my page using dream weaver cs4 navigation bar contains...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.