|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Everyone:
I have been looking high and low for an answer to my following question, possibly not looking in the right places, but I am hoping someone out there can point me in the right direction. Here's my situation: What I need is to be able to search through the source code of a HTML page for the ending </HTML> tag using Javascript. The reason being is that I want to verify that a page has been fully loaded(basically a preview of the page) before I upload its content to my website (via FTP). I don't want to use the "onLoad" method in Javascript because that would mean that I have to hardcode it into my HTML, and it causes alot of headaches for my overall program. Is there any method/way of searching through an open browser window's source could and checking for the </HTML> tag? I was looking into the "find" method (which doesn't work in IE)the "search" method, or the "toString" method, but can't seem to find any examples of what I would like to accomplish. Could someone help me out? Thanks so much in advance. Shawn |
|
#2
|
|||
|
|||
|
For that I would use sometihng like this:
<html> <head> <script language="JavaScript"> var t = ""; // get document html here alert(t.indexOf("</html>")); </script> </head> <body> <h1>test</h1> </body> </html> I'm not too sure how to get the HTML of the entire page though... |
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > Javascript: Search for HTML tags |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|