473,657 Members | 2,587 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

using focus() in navigation between frames.

33 New Member
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 2103
acoder
16,027 Recognized Expert Moderator MVP
Post your code.

You can give focus to radio buttons and check boxes, e.g. see link.
Aug 17 '07 #2
baskarpr
33 New Member
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 Recognized Expert Moderator MVP
What does the static text look like? Give an example.
Aug 17 '07 #4
baskarpr
33 New Member
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 Recognized Expert Moderator MVP
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
3518
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 disability groups that I am targeting the page at. The page basically consists of two frames; one being a vertical list of links positioned on the left hand side of the screen and the other being the main content pane, positioned in the remaining...
1
2190
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 another frame (refreshed) will cause the window to lose focus. The user can not even regain focus by clicking in the text field; one must click first in the window, then click in the text input field in order to continue typing. (Internet...
2
4983
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 simple. I would load a frameset and just move the correct frame by 100 pixels right and 100 pixels down. Here is the code I am using: <html> <script TYPE="text/javascript"> function scrollme()
0
1852
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 to cause the inner page to post back, but when I turn on smart navigation, it locks up IE. I tracked it down to the actual .submit() call in javascript, then its locked up. I set a couple of hidden form elements that I use for tracking, then...
6
1381
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, except that after the postback, the page is shown reset -- scrolled to the top and with no control having focus. Can I maintain scroll/focus w/o writing client-side scripting? thanks
4
3029
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 news group posts). Despite the trouble they cause, it is still tempting to use frames, occasionally, for instance for machine-generated pages that might have a large number of left-side navigation links. If you do use frames in that...
10
2546
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. six buttons which when clicked go to a separate web page. But here is where I must be missing something, am I right in thinking that if you wish to have nested navigation structures then each individual page of the web site must have a different...
2
2829
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 it looks like a frames page, it's actually not a frames page. Using different images has made it look like a frames page. The "Your Site Name" header, the 5 links "Home", "About", "Forums",
3
2390
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 Home, Retail Contact Us
0
8306
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7327
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4304
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1615
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.