|
Here is a way I was able to get it to work. The concept is that there is one hidden frame which counts the number of other frames which have finished loading. In the example, there are two frames showing and one too small to see.
index.html:
<frameset cols="100,*,1">
<frame name="left" src="left.html">
<frame name="right" src="right.html">
<frame name="hide" src="hide.html">
</frameset>
left.html and right.html:
<head>
<script language=javascript>
function notifyParent(){
parent.hide.watch++
}
</script>
</head>
<body onLoad=notifyParent()>
</body>
hide.html
<head>
<script>
//child_frames is the number of frames you need to load
child_frames=2
watch=0
function watchChild(){
if(watch == child_frames){
alert('all child frames are up')
}else{
setTimeout("watchChild()",3000)
}
}
</script>
</head>
<body onLoad="watchChild()">
</body>
As the frames come up, they add one to the "watch" variable in the "hidden" frame. Once the watch variable equals the child_frames variable, it is considered finished. You can replace the alert with whatever you need.
I don't know if this would work with iframes, if you are using those instead. It may require tweaking.
Hope this helps!
|
|
|
|
|
How to copy all source of page (...) during loading page in IE?
Thanks!
|
|
|
|
|
|
All,
I am looking for a code which retrieves a HTML source for a given website. I got few but none of the code really works for all websites. Some has security issues, some has timeout issues, some has redirect issues, some has session management issues. I am looking for the code which works for all kinds of websites.
given a website say www.xyz.com/default.aspx I want to retrieve the HTML source(same as when this page get rendered). I want to achieve this without any UI.
Does anyone knows where I can get one?
Thanks,
Anand
|
|
|
|
|
Anand Mudliar wrote:
I am looking for the code which works for all kinds of websites
First of all, good luck with this one. You could take a look at the HttpClient[^] project from Jakarta and check out some of its features. But for .NET, there's nothing like that that's 'out of the box'.
For a simple .NET solution, use the <cod>System.Net.WebClient class. Here's a quick little example.
<br />
WebClient wc = new WebClient();<br />
Stream s = wc.OpenRead("http://www.xyz.com/default.aspx");<br />
StreamReader sr = new StreamReader(s);<br />
string body_content = sr.ReadToEnd();<br />
sr.Close();<br />
~javier lozano
(blog)
|
|
|
|
|
Have you tried the WIN32 port of the UNI* tool wget
"An expert is a person who has made all the mistakes that can be made in a very narrow field." - Neils Bohr
|
|
|
|
|
I create a web service with an DelItem() method to delete a record of a table in SQL2000 database via a store procedure.
It works correctly itself but when i call it in my web application an error (UNAUTHORIZED) occurs.
Whats the problem?
---------------------------------------------
Exception Details: System.Net.WebException: The request failed with HTTP status 401: Unauthorized.
Source Error:
Line 59: [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://localhost/webservice/wsns/delitem",RequestNamespace="http://localhost/webservice/wsns",ResponseNamespace="http://localhost/webservice/wsns",Use=System.Web.Services.Description.SoapBindingUse.Literal,ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
Line 60: public string delitem(short code) {
Line 61: object[] results = this.Invoke("delitem", new object[] {
Line 62: code});
Line 63: return ((string)(results[0]));
Source File: D:\Inetpub\wwwroot\WebApplication\Web References\localhost\Reference.cs
Line: 61
------------------------------------
thanks alot
|
|
|
|
|
Could you post more information on how your client access this web service? Also, do you have anonymous access setup for the web application that hosts the web service?
~javier lozano
(blog)
|
|
|
|
|
dear lozano
i add a web refrence in my web application and select this web service. the app. recognize it and its methods but when i run the app. that error occurs.
i test very simple web service (hello world) but nothing chenged.
i think there must be something that allow the app to use the web services methods.
thanks alot
|
|
|
|
|
Try setting Credential property to CredentialCache.DefaultCredentials
Thanks,
Anand
|
|
|
|
|
Hello
Reporting services
-ASP.net
-C#
I was wondering if anyone had any info on how to set up MS reporting services to be Form authenticated insted of windows authenticated
I have recently constructed a group of reports that are being accessed from an application.
these reports have been set up to prompt for a windows password when ever someone tries to view them. The application i have created has its own custom log in screen that prompts a user for pw and user name that is verifed, once the user logs in i dont want then to have to log in a second time to view a page containing a report, The msdn site gives instruction on how to have your reports server set up for Form authentication
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/ufairs.asp
I have followed these instructions and am left with an error as follows.
"Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
..."
i have followed the instruction several times and each time has produced the same result.
i was wondering if anyone had any info on how to set up MS reporting services to be Form authenticated insted of windows authenticated
|
|
|
|
|
How can I dynamically install Microsoft loopback adapter programatically in C#, if so, can i have multi-instances of it?
and what would be the way to configure its IP address, media type, etc. through run-time.
|
|
|
|
|
Hi
I am generating small report in html using combine with MFC. Problem is when my report is printing page is ejecting automatically so how can i prevent page eject automatically in HTML because next report will be print in current page ?
|
|
|
|
|
Can CSS Print profile[^] help? (page-break) I don't have lot experiences with it so your report is welcomed
best regards,
David 'DNH' Nohejl
Never forget: "Stay kul and happy" (I.A.)
|
|
|
|
|
Im making a testing server on my WXP
machine.
I have installed IIS and php (w/ default options)
and im trying to get/store information
from my MS Access db via odbc. I setup a
sysem dns entry and it works fine reading
database, but i am unable to save any
information via for example INSERT INTO
query. Test.php file was set read/write/
script execute privileges, but it doesnt help.
I was looking in MSDN, and found, that maybe
my windows account which is used to access
files from my local server doesnt have
enough privileges to write. I check out
local securty policies but was unable to
find entry regarding this matter.
thank you in advance for any help
im sure the answer is trivial
thinman
|
|
|
|
|
Hi there!
Try reset permission of your web-dir (ex: wwwroot/your-dir).
- right click on "your-dir" dir and choose "All Tasks" menu, click "permissions wizard"
- Next -> choose Inherit all security settings
-> Replace all directory and file permissions (recommended) -> next ...> finish
I use WinXP sp2, iis
I'm an beginner !
|
|
|
|
|
Hi,
Can u plz tell me that why this script doesn't work if I uncomment the commented line.
<HTML>
<HEAD>
<TITLE>JavaScript Test</TITLE>
<SCRIPT language="JavaScript">
<!--
function clock()
{
var today=new Date();
var hr=today.getHours();
var min=today.getMinutes();
var sec=today.getSeconds();
if(hr < 10)
hr=" "+hr;
if(min < 10)
min="0"+min;
if(sec < 10)
sec="0"+sec;
var el=document.getElementById(1);
el.innerHTML=hr+" : "+min+" : "+sec;
document.clock.digits.value = hr + " : " + min + " : " + sec ;
//document.write(hr+" : "+min+" : "+sec);
setTimeout("clock()",1000);
}
//-->
</SCRIPT>
</HEAD>
<BODY bgcolor="white" onload="clock()">
<div id="1"></div>
<FORM name="clock">
<INPUT type="text" name="digits"size=8 maxlength=8 value="Loading">
</FORM>
</BODY>
</HTML>
|
|
|
|
|
Naturally document.write(...); is placed in blocks inside the <body>. As the browser loads the html document if it finds a <code>document.write(...);</code> code it appends the dynamically generated content and continue loading the rest of the document.
What happens here is that the write() function is called through the onload event. Browser does not know where to place the new content since the parsing has allready ended. So it just replace the current document with the new one. (you assume it sould append it to the end, right? )
In IE the next fire of timer can't find the clock() function and gives you a jscript error. In mozilla the timer is clear along with the document.
Try removing the onload event and put a <script>clock() before . Now the first call to clock() does what you wanted, but the first fire of timer replaces the document since the caller (timer event that is..) can not be located as a place in the loaded document.
you might call clock() within a loop but this also fire a 'script taking to long' box.
I also try document.write("time is:"+hr+" : "+min+" : "+sec+""+clock+"");
but by the time document.write is called, everything else is lost.
- - - - - - - - - - - - - - - - - -
Memory leaks is the price we pay \0
01234567890123456789012345678901234
|
|
|
|
|
You said:
What happens here is that the write() function is called through the onload event. Browser does not know where to place the new content since the parsing has allready ended.
Then why it does not happen with div and form element.
As I am new to javascript I require more clear explanation.
Thanks
Ranjan
|
|
|
|
|
The write() function was intend to create dynamic content during the document load.
<body><br />
line1<br/><br />
<script>document.write('hello world!')</script><br/><br />
line 3<br/><br />
</body>
This is what you see:
line1
hello world!
line3
As you can see the code is executed and the result is placed right when it is encounter. If the write() function is called due to an event then where should it place it's result?
- - - - - - - - - - - - - - - - - -
Memory leaks is the price we pay \0
01234567890123456789012345678901234
|
|
|
|
|
Thanks a lot for your very clear response.
Ranjan
|
|
|
|
|
I need some advice.
When I am retrieving data from a database and displaying it in the following manner:
<OBJECT id=OBJECT1 name=Conn RUNAT="server" PROGID="ADODB.Connection"></OBJECT>
<OBJECT id=OBJECT2 PROGID="ADODB.Recordset" RUNAT="server"></OBJECT>
<script language="VBScript" runat="server">
'open up the recordset and display the data in a textbox
response.write "<input type='text' name='whatever' size='25' maxlength='20' value='" & object2.fields("Whatever") & "'>"
</script>
The text displayed is sometimes only a part of the text retrieved from the database table and sometimes is the full text.
Sometimes when the full text is displayed and every time only partial text is displayed, you cannot add more text to the text box without going to the last character in the string and holding down the DELETE key for a second.
Is there any help for this?
|
|
|
|
|
|
I'm working on a project which requires multiple language support.
Until now i've been using PHP define and using the MACRO throughout my code instead of hardcoded values.
This makes using translation files much easier, however this is not optimal either, because of other techniques i'm using...
Anyone have any experience with this???
Any articles on how do it better, etc...
Thanks
It's frustrating being a genius and living the life of a moron!!!
|
|
|
|
|
A simple method can be found in http://phpmailer.sourceforge.net/
They simply use several language .php files e.g.
$PHPMAILER_LANG = array();<br />
$PHPMAILER_LANG["provide_address"] = 'Voc?eve fornecer pelo menos um endere?de destinat?o de email.';<br />
$PHPMAILER_LANG["mailer_not_supported"] = ' mailer n?suportado.';
look for function SetLanguage in class_phpmailer.php and then use the array to get the relevant language string
"An expert is a person who has made all the mistakes that can be made in a very narrow field." - Neils Bohr
|
|
|
|