473,396 Members | 2,089 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,396 software developers and data experts.

update frame with javascript

hello guys
i'm newbie here so it might sound like a stupid quastion
i have 4 frame - 3 on the left and one main on the right
i have links in one of the small frame that changes the page on the
main frame,that work fine
i want that with that click, that another frame will get a parameter to
a textbox

i've tried this link but it doesn't work
<a href=".\000.PDF" target="Main"
onclick="javascript:top.left2.form1.TextBox1.Text= 24'>
000.PDF</a>

please your advise

Dec 26 '05 #1
7 4508

shuki wrote:
hello guys
i'm newbie here so it might sound like a stupid quastion
i have 4 frame - 3 on the left and one main on the right
i have links in one of the small frame that changes the page on the
main frame,that work fine
i want that with that click, that another frame will get a parameter to
a textbox

i've tried this link but it doesn't work
<a href=".\000.PDF" target="Main"
onclick="javascript:top.left2.form1.TextBox1.Text= 24'>
000.PDF</a>

please your advise


onclick="parent.left2.form1.TextBox1.value=24;'

- You don't know if your frameset doesn't live within other frameset
- onClick invokes javascript function, not URL. No need to add
javascript:
- .value is the property containing the content of inputs.

Dec 26 '05 #2
i've tried that - but it doesn't work also.
let me understand -
parent is the host page of all the frames ?
then i get to the "brother" frame (left2) and then to the form in left2
am i right ?
what is the document object ?

Dec 27 '05 #3
this is my framesets

<frameset cols="20%,80%">
<frameset rows="30%,40%,*">
<frame name="UserInfo" src="UserInfo.aspx">
<frame name="FileList" src="FileList.aspx">
<frame name="Actions" src="Actions.aspx">
</frameset>
<frame name="DocMain">
</frameset>

in the file list i have a list of files that when i click the link they
are opened in the main frame
each link is build like this
<a href="000.pdf" target=DocMain>
i wan to add to the click on the link the ability that it would send
the name of the file to the actions frame
what to do????
this is my first frame project and i don't know too much
javascript........
thax

Dec 27 '05 #4

shuki wrote:
i've tried that - but it doesn't work also.
(well, I didn't say I don't do mistakes also. Most of these things I
type from memory without any check whatsoever so often I miss
something. We're getting closer to the Truth, but not quite there.)
let me understand -
parent is the host page of all the frames ?
Just of current frame. And its siblings. It still can be contained
within other frameset document, being one of its frames (frame
containing more frames). One of these will eventually be 'top', but the
true 'parent' of your frame family is 'parent'.
then i get to the "brother" frame (left2) and then to the form in left2 am i right ? Yes.
what is the document object ?
good point, missed this one. The frame (or window) is a 'viewport', a
piece of the browser yet. A box that will contain the document. You
don't have much control over it for security reasons, because it
contains all the browser functionality - lots and lots of functions
responsible for all the user can do with the browser.
Document is the basic canvas underlying the content (not displayable
yet, but containing all the rest), but it's part of the content
already. You 'own' the document and are free to do whatever you wish to
it. Add/remove content, read, write, whatever. It also contains the
data the page contains...

onclick="parent.actions.document.form1.TextBox1.va lue=this.src;'
(I think...)

left2 by itself doesn't contain much of your data. Besides all the
browser stuff for most of which you don't have any access anyway, it
just contains 'document'. And 'document' contains all the rest,
including your form. My screwup.
this is my first frame project and i don't know too much
javascript........


Read lots and lots of online docs. It's all there. Look for DevEdge
Sidebar, it's an invaluable resource. (grab a version that has
Javascript reference included - several different ones float around the
web). Read http://www.quirksmode.org/ for lots of techniques used in
js. When you are through, read http://www.crockford.com/javascript/ for
deeper insight into the language.

Dec 28 '05 #5
i read a little in the quirksmode site and it was pretty good for the
basic knowlege but still i couldn't get to the right command to do the
job - it keep alerting to me that the item is null or not an object
i tried to do it throw a function on the traget html like this
<script language=vbscript>
public function SetDocSN(sn)
DocSN.text=sn
end function
</script>

and then to do
'onclick=parent.actions.document.form1.SetDocSN(24 )'
but it says "object requared"

please helppppp !!!!!!!!!!!

Dec 28 '05 #6

shuki napisal(a):
i read a little in the quirksmode site and it was pretty good for the
basic knowlege but still i couldn't get to the right command to do the
job - it keep alerting to me that the item is null or not an object
i tried to do it throw a function on the traget html like this
<script language=vbscript>
public function SetDocSN(sn)
DocSN.text=sn
end function
</script>

and then to do
'onclick=parent.actions.document.form1.SetDocSN(24 )'
but it says "object requared"


How did you get vbscript into this???
What kind of input is that if you need vbscript to write to it?

Dec 28 '05 #7
shuki wrote:
i've tried that - but it doesn't work also.
Tried what?

<URL:http://jibbering.com/faq/faq_notes/pots1.html#ps1Post>

<FAQENTRY>

Since the number of Google Groups users posting here grows, could we
please include

<URL:http://www.safalra.com/special/googlegroupsreply/>

or a similar explanation on how to quote with Google Groups to the
FAQ Notes?

</FAQENTRY>
let me understand -
parent is the host page of all the frames ?
In a sense, (window.)parent refers to the "host page" of all frames within
the same nesting level as the current frame. In that sense, (window.)top
refers to the "host page" of all the frames, meaning that (window.)parent
== (window.)top if the current frame (the one `window' refers to) is nested
one level deep.

You should use the term "frameset document" instead of the term "host page".
then i get to the "brother" frame (left2) and then to the form in left2
am i right ?
what is the document object ?


<URL:http://en.wikipedia.org/wiki/JavaScript#Authoring_Guides_.2F_Reference_Material >

Try any JavaScript Reference before version 1.4, since in v1.4 core
JavaScript language and the (Netscape Navigator) DOM have been separated.
PointedEars
Jan 5 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bart Plessers \(artabel\) | last post by:
Hello, I am wondering if one could do following. I have a main frame with 3 subframes ("top", "left" and "contents") I have a link in the left frame, someting like: <a...
1
by: clemenr | last post by:
Hi. I would like to know if the following is feasible in JavaScript. I would create a frameset where the top frame includes JavaScript. The bottom frame would be directed to the login page of an...
2
by: JAW | last post by:
I have posted this in a couple of the other newsgropus but have not recieved any responses. Thought I would try it here. I have a frameset that contains frames (top and bottom). In the bottopm...
1
by: mailing | last post by:
Hello, I am hoping that someone can point me in the right direction. I have 4 frames to my site. Two Rows, Two Columns. |--------------------------------|-------------------------| | ...
10
by: steve | last post by:
Hi All, My site has two frames, one with a menu system, one with the selected results. I can select a menu item and get the other frame to reflect that selection. But I want to select 'log...
42
by: smerf | last post by:
Using javascript, is there a way to trap an external page inside a frame? I've seen scripts to break out of frames, but nothing to keep a page trapped in a frame.
6
by: Mark | last post by:
I'm building a web utility to do some processing that will run for several hours. Assume I have a valid reason for using the web for the utility. During the process I'd like to display an update...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.