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 2079
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.
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 ).
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...
|
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...
|
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...
|
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...
|
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,...
|
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...
|
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....
|
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...
|
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...
|
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...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
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...
|
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...
|
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...
|
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)...
|
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...
|
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....
|
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
| |