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.
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.
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. -
function showChapter(chapterName) {
-
/* THIS METHOD IS USED TO DISPLAY AND FOCUS SELECTED CHAPTER */
-
-
var elemArray=document.getElementsByName(chapterName);
-
if(elemArray!=null) {
-
for(var i=0;i<elemArray.length;i++) {
-
if(elemArray[i].type=="text" || elemArray[i].type=="checkbox" || elemArray[i].type=="radio" || elemArray[i].type=="textarea" ) {
-
elemArray[i].focus();
-
break;
-
}
-
}
-
}
-
else {
-
//no such element
-
}
-
}
-
-
/*every chapter is an element in right side .That may be any input type or even
-
a static text.
-
*/
-
My main issue is I have to display static text also.
acoder 16,027
Recognized Expert Moderator MVP
What does the static text look like? Give an example.
What does the static text look like? Give an example.
actually right frame content is generated by XSL. It looks like something below : - <section id="1-1-1" name="Name">
-
<format type="textbox" maxlen="32" />
-
</section>
-
-
<section id="1-1-2" name="Address">
-
<format type="textarea" maxlen="70" />
-
</section>
-
-
<section id="1-1-3" name="Sex">
-
<format type="radio button" value="male,female"/>
-
</section>
-
-
<section id="1-1-4" name="Fill below sections">
-
<format type="label" value="All inputs are mandatory"/>
-
</section>
After generating as HTML: - Name :<input type="text" name="1-1-1" > <br/>
-
-
Address :<textarea name="1-1-2"></textarea> <br/>
-
-
Sex :<input type="radio" name="1-1-3" >male <br/>
-
<input type="radio" name="1-1-3" >female<br/>
-
-
Fill below sections <br/>
-
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 ).
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.
Sign in to post your reply or Sign up for a free account.
Similar topics |
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...
|
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...
|
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()
|
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...
|
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
| |
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...
|
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...
|
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",
|
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
|
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,...
|
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...
| |
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...
|
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...
|
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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |