473,508 Members | 2,367 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I create a frame in which I can update the source of another frame?

1 New Member
I need my users to be able to change the source of a frame. The best example of this is here:
Tryit - W3schools "Tryit Editor"

Is there any way I can accomplish this?
Sep 21 '09 #1
2 1559
jhasandy
1 New Member
plz explain any1 the following javascript code.......

Expand|Select|Wrap|Line Numbers
  1. function MM_findObj(n, d) { //v4.01
  2.   var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  3.     d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  4.   if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  5.   for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  6.   if(!x && d.getElementById) x=d.getElementById(n); return x;
  7. }
  8.  
  9. function MM_validateForm() { //v4.0
  10.   var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  11.   for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
  12.     if (val) { nm=val.name; if ((val=val.value)!="") {
  13.       if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
  14.         if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
  15.       } else if (test!='R') { num = parseFloat(val);
  16.         if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
  17.         if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
  18.           min=test.substring(8,p); max=test.substring(p+1);
  19.           if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
  20.     } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  21.   } if (errors) alert('The following error(s) occurred:\n'+errors);
  22.   document.MM_returnValue = (errors == '');
Sep 21 '09 #2
Dormilich
8,658 Recognized Expert Moderator Expert
what do you know about Javascript?

PS. the first function is terribly outdated.
Sep 21 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2147
by: Ike | last post by:
Suppose I have two frames, as shown in the script below. One of the frames, I would like to have reload every ten minutes or so. Hower, the frame I wish to reload is a php script, which executes...
3
2451
by: qwerty | last post by:
I´m new to ASP.Net. My workmate has some experience with it. He claimed that in ASP.Net working with frames is much simpler than it was ASP. I asked explanation but he couldn't give me such. (a...
3
1956
by: Microsoft | last post by:
How do I refer to the content of one frame from another frame. Depending on which command button is pressed in one frame I wish to chnage what is displayed in another frame. Thanks Colin
2
1486
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...
17
4146
by: Bruno | last post by:
I have a feature that is hosted on a different domain from the primary one in a frame, and need to retain values in a cookie. example: A web page at one.com contains a frame which has a page...
16
1810
by: Phlip | last post by:
Javascripters: I have a page with an iframe inside. Let's say the iframe looks like this: <script src="/javascripts/prototype.js" type="text/javascript" /> .... <iframe id='grinder'...
15
2230
by: Phlip | last post by:
Javascripters: I have an outer page and an inner iframe. The outer page calculates some javascript, and wants the inner frame to run it. The inner frame should hit a page on the same (private)...
27
3740
by: max | last post by:
Hello, I am a newbye, and I'm trying to write a simple application. I have five tables with three columns; all tables are identical; I need to change some data in the first table and let VB...
1
4613
by: lipa | last post by:
I'm making a website that's consists entirely of flash . I know how to create a button that functions as a link to another flash frame using the Button selection in the Components window and applying...
0
7223
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
7115
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...
0
7321
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
7377
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...
1
7036
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
7489
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...
1
5047
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.