473,218 Members | 1,392 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,218 software developers and data experts.

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

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 1552
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 Expert Mod 8TB
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
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
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
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
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
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
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
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
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
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...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.