Ask Question Forum:
Model Library:2025-02-08:A.I. model is online auto reply
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by duncanb7
at 2024-04-15 14:40:59
Point:500 Replies:6 POST_ID:828477USER_ID:11059
Topic:
JavaScript;;Hypertext Markup Language (HTML)
I try use to Jquery's load() fucntion to alert the web page loaded is completed or not in frame
, just see the following example code attached in core area
The code work fine for all domain site , for example , http://www.yahoo.com putting in third frame
<frame id="mainFrame" name="mainFrame" marginwidth=0 marginheight=0 src="http://www.yahoo.com" frameborder="no" ></frame>
</frameset>
Two alert message boxes are coming out for "frame document is ready " and "frame window is loaded"
But if I put my html file at src =http://www.mywebiste.com/test.html in the same thrid frame of "mainFrame",
it work only for .ready function but it doesn't work for load(), only one alert message box is coming for "frame
document is ready" , even I change to other my html file and it is also same result. So I suspect Jquery load()
function is only checked for index page of domain in frame and not for file with html extentsion. Is it Right ?
Please advise
Duncan
, just see the following example code attached in core area
The code work fine for all domain site , for example , http://www.yahoo.com putting in third frame
<frame id="mainFrame" name="mainFrame" marginwidth=0 marginheight=0 src="http://www.yahoo.com" frameborder="no" ></frame>
</frameset>
Two alert message boxes are coming out for "frame document is ready " and "frame window is loaded"
But if I put my html file at src =http://www.mywebiste.com/test.html in the same thrid frame of "mainFrame",
it work only for .ready function but it doesn't work for load(), only one alert message box is coming for "frame
document is ready" , even I change to other my html file and it is also same result. So I suspect Jquery load()
function is only checked for index page of domain in frame and not for file with html extentsion. Is it Right ?
Please advise
Duncan
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN""http://www.w3.org/TR/html4/frameset.dtd"><html lang="en"><head><title>jQuery demo</title><META HTTP-EQUIV="Pragma" CONTENT="no-cache"><META HTTP-EQUIV="Expires" CONTENT="-1"></head><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script><script type="text/javascript"> $('#mainFrame').ready(function() { alert("frame document is ready");$('#mainFrame').load(function() { alert("frame window is loaded"); });});</script><frameset rows="45, 100,*" cols="*"><frame id="flashFrame" name="flashFrame" marginwidth=0 marginheight=0 frameborder="no" scrolling="NO" src="/hello.html"><frame id="myFrame" name="topFrame" frameborder="no" scrolling="NO" src="/hello.html"><script language="javascript"> document.getElementById("myFrame").noResize = true;</script><frame id="mainFrame" name="mainFrame" marginwidth=0 marginheight=0 src="http://www.yahoo.com" frameborder="no" ></frame></frameset><HEAD><META HTTP-EQUIV="Pragma" CONTENT="no-cache"><META HTTP-EQUIV="Expires" CONTENT="-1"></HEAD></html> 1:2:3:4:5:6:7:8:9:10:11:12:13:14:15:16:17:18:19:20:21:22:23:24:25:26:27:28:29:30:31:32:33:34:
Author: duncanb7 replied at 2024-12-23 09:50:33
THanks for your reply
The question is partially to be solved
Duncan
The question is partially to be solved
Duncan
Author: duncanb7 replied at 2024-05-05 11:01:50
Any suggestion ?
Assisted Solution
Expert: khan_webguru replied at 2024-04-20 23:46:34
167 points GOOD
The code that you are mentioned in your last post is again for main file in which you are using IFRAME but I was saying that lets suppose you have main.htm file in which you have 3 frames. And one of the fame has url "abc.htm" means you are loading the file in IFRAME. so not in main file but the file that is opening in IFrame in that you have to write this code in HEAD section .
$(document).ready(function() { alert("frame document is ready");});$(document).load(function() { alert("frame window is loaded"); }); 1:2:3:4:5:6:
see post#35422289 carefully.
And then let me know about the results.
Thanks.
Author: duncanb7 replied at 2024-04-20 07:47:13
I tried this before and it fail and so people ask to change it as follows
<script type="text/javascript">
$('#mainFrame').ready(function() {
alert("frame document is ready");
$('#mainFrame').load(function() {
alert("frame window is loaded");
});
});
</script>
<script type="text/javascript">
$('#mainFrame').ready(function() {
alert("frame document is ready");
$('#mainFrame').load(function() {
alert("frame window is loaded");
});
});
</script>
Assisted Solution
Expert: khan_webguru replied at 2024-04-19 01:10:03
166 points GOOD
Put this code in head section of your HTML file
$(document).ready(function() { alert("frame document is ready");});$(document).load(function() { alert("frame window is loaded"); }); 1:2:3:4:5:6:
And then add this HTML page on other page as frame and see the result hope you will get desire result.
Thanks,
Asif Ahmed Khan
Accepted Solution
Expert: leakim971 replied at 2024-04-16 05:16:06
167 points GOOD