473,379 Members | 1,520 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,379 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 2081
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...
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.