ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
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  
Old June 3rd, 2002, 12:57 PM
SABmore SABmore is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 17 SABmore User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 m 34 sec
Reputation Power: 0
Unhappy Javascript: Search for HTML tags

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

Reply With Quote
  #2  
Old June 3rd, 2002, 06:13 PM
MarkK MarkK is offline
Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 4 MarkK User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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...

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > Javascript: Search for HTML tags


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway