popups being spidered

windows

Guest
I have several information popup pages. If these pages are spidered by search engines and listed on their pages, when someone comes to one of these from the search engine listing they will come to a page which has no links on it and which will close as soon as the viewer clicks anywhere on the screen. <br />
<br />
onBlur="self.close()" onClick="self.close()"<br />
<br />
Try it!<br />
<br />
<!-- m --><a class="postlink" href="http://www.editfast.com/editpops/advertis.htm">http://www.editfast.com/editpops/advertis.htm</a><!-- m --><br />
<br />
The problem is (or will be) that the viewer will not be able to go anywhere in the site from this page. In fact thier browser will close if it is the only window they have open. That will lead to some frustrated viewers I am sure but I want to keep these popups this way.<br />
<br />
One solution would be to have the main page open as well as the popup if the person comes to the popup from a search engine listing. (How??? Javascript? CGI?)<br />
<br />
This seems like a complex solution but I can't think of anything else at the moment. Anyone got a simpler idea? I don't want a timed redirect on these popups. If anyone has a better idea I would certainly be glad to hear it.<br />
<br />
Bob<!--content-->this is definitely a javascript problem. if you want that to happen you must add a script to your page that asks the popup a few questions and follows certian directions determined by criteria. you gotta ask the pop up to determine if the main window is open and if it is then it shouldnt do anything but if it isnt open then it should open it up in a new page. and also you need to add a code to the page with the pop up codes to say wether or not it should open up a pop up which it shouldnt if the pop ups are already open... i am not at my desk now so i cant go and generate that code but if you can do it yourself then make it and then let me see it so I can tell if it is what i was talkin about.<!--content-->I don't think I have ever seen a search engine list popup pages. you could try a robot.txt file which most search engines read when they spider your page.<br />
<br />
let me find a link for ya....<!--content-->http://www.robotstxt.org/wc/exclusion.html<br />
<br />
or<br />
<br />
<!-- m --><a class="postlink" href="http://www.netmechanic.com/toolbox/faq.htm">http://www.netmechanic.com/toolbox/faq.htm</a><!-- m --><!--content-->Silentassassyn and Scoutt,<br />
Thanks for your reply.<br />
Scoutt, I want the search engines to spider these pages. They are not really popups. They are just pages whose elements and configuration is controlled by javascript. They exist on my site and can be accessed through a link just like any other page. This is similar to the problem with individual frames being accessed from search engines so that all people see is the left Nav Bar or something like that. I already have a robot text which allows them to be spidered but disallows access to other "sensitive" files. They will be spidered ... someday. <br />
<br />
When that time comes I would like to do what Silentassassyn has so clearly (?) stated. I understand what you mean and that is what I would like to do but I am not a javascript guru by any means. Mostly a cut and paste guy. I am good at the ideas but the implementation is very slow for me. Took me a week to get these info windows working. But "Genius is eternal patience." -- Michelangelo (Now if I just had Michelangelo here to help ...)<br />
<br />
So...I have my main page "index.htm" on there is a link to the "reports.htm" <br />
<br />
<a class="two" href=http://www.htmlforums.com/archive/index.php/"../editpops/reports.htm" target="_blank" onclick="NewWindow(this.href,'reports','425','375');return false">Reports</a> <br />
<br />
Normally "reports.htm" opens when the above link on the main page is clicked but if "reports.htm" opens without the main page (That is the "reports.htm" direct URL<br />
<br />
<!-- m --><a class="postlink" href="http://www.editfast.com/editpops/reports.htm">http://www.editfast.com/editpops/reports.htm</a><!-- m --><br />
<br />
is clicked on an SE's search results page then I want the main page "index.htm"<br />
<br />
<!-- m --><a class="postlink" href="http://www.editfast.com/index.htm">http://www.editfast.com/index.htm</a><!-- m --><br />
<br />
to open also and have the "reports.htm" to appear on top as specified in the javascript in the header of "index.htm"<br />
<br />
<script type=text/javascript><br />
var popit= '';<br />
function NewWindow(mypage,myname,w,h,scroll){<br />
var winl = (screen.width-w)/2;<br />
var wint = (screen.height-h)/2;<br />
var settings ='height='+h+',';<br />
settings +='width='+w+',';<br />
settings +='top='+wint+',';<br />
settings +='left='+winl+',';<br />
settings +='scrollbars=no'+',';<br />
settings +='toolbar=no'+',';<br />
settings +='directories=no'+',';<br />
settings +='location=no'+',';<br />
settings +='status=no'+',';<br />
settings +='menubar=no'+',';<br />
settings +='resizable=no"';<br />
popit=window.open(mypage,myname,settings);<br />
if(parseInt(navigator.appVersion) >= 4){popit.focus();}<br />
}<br />
</script><br />
<br />
<br />
This is a real example. These URL's are real. These pages exist but I have 10 - 13 of these "infopages" so we would have to adjust the script to acccomodate these others also.<br />
<br />
That's it! Is it possible to do this without bloating the pages too much? Is there a better solution? Easier? Simpler? I don't even know where to begin but with your help I can do it ... maybe.<br />
<br />
Bob<!--content-->If a window is opened through script, then it will have it's opener property pointing to the window that opened it. So... all you have to do is check the opener property.<br />
<br />
In the popup windows:<br />
<br />
<body onload="checkOpener()"><br />
<br />
<script language="Javascript"><br />
function checkOpener() {<br />
if (!self.opener || self.opener.location.href.toLowerCase() != "www.mysite.com/mainpage.html") {<br />
window.open("www.mysite.com/mainpage.html")<br />
}<br />
}<br />
</script><!--content-->Jon! Thanks a lot. You are THE guru! I had visions of a two page external JS file.<br />
<br />
Just a couple of things<br />
<br />
1) because of the<br />
<br />
onBlur="self.close()"<br />
<br />
in the popup body tag, the window wants to close when the main page is loaded. So I need to keep the window in focus over and above the main window and a second popup which loads when the main window loads ( I may make this a popunder, don't know yet)<br />
<br />
2) I have added my own script to resize and shift the popup to the center of the screen. <br />
<br />
<script language="JavaScript"><br />
function shift_it()<br />
{<br />
self.moveTo(200,150);<br />
self.resizeTo(425,375);<br />
}<br />
</script><br />
<br />
But this also resizes the main page as well. I don't know why or how it does this! It has also left a "residue" on my machine so that now when ever I open a new browser window it opens at the same tiny size as the popup(????) I would like to incorporate the window properties for the popup from the link on the main page <br />
<br />
<a class="two" href=http://www.htmlforums.com/archive/index.php/"../editpops/advertis.htm" target="_blank" onclick="NewWindow(this.href,'advertising','425','375');return false">Ad <br />
Copy</a><br />
<br />
and from the script in the header of the main page<br />
<br />
<script type=text/javascript><br />
var win= null;<br />
function NewWindow(mypage,myname,w,h,scroll){<br />
var winl = (screen.width-w)/2;<br />
var wint = (screen.height-h)/2;<br />
var settings ='height='+h+',';<br />
settings +='width='+w+',';<br />
settings +='top='+wint+',';<br />
settings +='left='+winl+',';<br />
settings +='scrollbars=no';<br />
settings +='toolbar=no';<br />
settings +='directories=no';<br />
settings +='location=no';<br />
settings +='status=no';<br />
settings +='menubar=no';<br />
settings +='resizable=no';<br />
settings +='fullscreen=yes';<br />
win=window.open(mypage,myname,settings);<br />
if(parseInt(navigator.appVersion) >= 4){win.window.focus();}<br />
}<br />
</script><br />
<br />
Finally, the body tag is getting pretty crowded. Will this cause problems?<br />
<br />
<body onload="checkOpener();shift_it();" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onBlur="self.close()" onClick="self.close()"><br />
<br />
<br />
You can see how it works by going here<br />
<br />
<!-- m --><a class="postlink" href="http://www.editfast.com/editpops/advertis.htm">http://www.editfast.com/editpops/advertis.htm</a><!-- m --><br />
<br />
Thanks again Jon<br />
<br />
Bob<!--content-->Strange! This worked this afternoon when I tried it but now if I go to<br />
<!-- m --><a class="postlink" href="http://www.editfast.com/editpops/">http://www.editfast.com/editpops/</a><!-- m --><br />
and click on the "Ad Copy" link (the blue text link above the blue bar and below the red arrow) the popup opens but then the main page opens in the same window. Odd behaviour considering it worked earlier.<br />
<br />
<script language="Javascript"><br />
function checkOpener() {<br />
if (!self.opener || self.opener.location.href.toLowerCase() != "http://www.editfast.com/") {<br />
window.open("http://www.editfast.com/")<br />
}<br />
}<br />
</script><br />
<br />
<br />
However this works<br />
<!-- m --><a class="postlink" href="http://www.editfast.com/editpops/advertis.htm">http://www.editfast.com/editpops/advertis.htm</a><!-- m --><br />
After a fashion. ;o)<br />
<br />
Bob<!--content-->
 
Back
Top