Popup Based on the contents of current window

S

shuchalle

Hello all,

I want to pop up a window from a web page if that page contains a
specific string such as 'Maradia users'.

Any help would be much appreciated.

Thank you!

azxml
 
E

Erwin Moller

Hello all,

I want to pop up a window from a web page if that page contains a
specific string such as 'Maradia users'.

Any help would be much appreciated.

Thank you!

azxml

Hi,

You could put a div around the whole page, and get it's inneHTML, then
search that for your string.

something like:
<html>
<head>
<title>bla</title>

<script type="text/javascript">
function checkPage(){
var myPage=document.getElementById("myWholePage").innerHTML;
// check for string here
}
</script>

</head>
<body onLoad="checkPage();">
<div id="myWholePage">
..... your whole page here ...
</div>
</body>
</html>

Regards,
Erwin Moller
 
S

shuchalle

Thanks! that did it!

Erwin said:
Hi,

You could put a div around the whole page, and get it's inneHTML, then
search that for your string.

something like:
<html>
<head>
<title>bla</title>

<script type="text/javascript">
function checkPage(){
var myPage=document.getElementById("myWholePage").innerHTML;
// check for string here
}
</script>

</head>
<body onLoad="checkPage();">
<div id="myWholePage">
.... your whole page here ...
</div>
</body>
</html>

Regards,
Erwin Moller
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top