|Paul in South Africa|
| 11:02 am on Apr 30, 2003 (gmt 0)|
should work. This will open the page in a new window of the specified size with no toobar etc.
| 11:06 am on Apr 30, 2003 (gmt 0)|
That was exactly what I needed :)
| 11:12 am on Apr 30, 2003 (gmt 0)|
You could also put this script in a real HTML anchor to serve 2 purposes :
a) make it work for JS disabled browsers (about 8 % of market)
b) make this link readable by search engine spiders, so pop-up page is indexable
I use this in original page :
<a href="page.htm" onClick="window.open('page.htm','','scrollbars=XX,resizable=XX,
And this in pop-up <body> tag:
| 1:11 pm on Apr 30, 2003 (gmt 0)|
The reason that your code in the firsst post didn't work is that you are using a <TD.. tag, and, unlike the <A tag, the <TD tag doesn't have a target= attribute.
Just to add to Macguru's post:
then you don't need the onLoad=window.resizeTo(WWW,HHH); in your pop-up.
Then you won't need your <font color="#FF6666"></font> tag either.
| 1:17 pm on Apr 30, 2003 (gmt 0)|
I add window size in onload event because I want visitors to know they are in a pop-up when they open the page from a search engine. This may not be applicable to all cases...
It is also a good idea to add a link to a 'normal' page in the pop-up.
| 1:23 pm on Apr 30, 2003 (gmt 0)|
Correct me if I'm wrong but the code you have posted only works on text links?
I wanted a new window to open when the 'onclick' function was called anywhere over a table cell regardless of it's text content. This way I can save time making rollover images for a navigation menu and reduce download times of the page by having the rollover as JS.
Is it possible to do this so the link for the table cell will be spidered by SE's.
| 2:19 pm on Apr 30, 2003 (gmt 0)|
|"...I add window size in onload event because I want visitors to know they are in a pop-up when they open the page from a search engine..." |
| 2:37 pm on Apr 30, 2003 (gmt 0)|
>> The reason that your code in the firsst post didn't work is that you are using a <TD.. tag, and, unlike the <A tag, the <TD tag doesn't have a target= attribute.
I see that now :)
With the CSS, will it change the background of the entire table cell? or will it just change the background of the link text?
| 12:59 am on May 1, 2003 (gmt 0)|
>>> "...With the CSS, will it change the background of the entire table cell?..."
Just the text in the <A> tag. And I don't think you can define :hover css properties for other tags, just for <A>. There are 2 things that you can do, however:
1. Define height and width css properties of the <A> tag to be 100% (i.e. 100% of what contains it, being the table cell). Not sure if it will work, or how browser dependant it is. You can try it.
2. And this one I am sure of... Between the <A> and the </A> define a "<div> your link text </div>". Then in the css you can define the size of the div to be whatever you want.
| 10:40 am on May 1, 2003 (gmt 0)|
Will give that a go.
But I am no expert with CSS. One of the many things on my list of 'things to learn'. Problem is that list seems to get bigger, faster than I can tick em off.
C'est la vie :)
| 10:58 am on May 1, 2003 (gmt 0)|
>>"..that list seems to get bigger.."
Me too. But the good news is that CSS is really easy. The other bit of good news is that technology changes so fast and technologies become obsolete, so if you don't get to half of the technologies in the list it doesn't matter. They'll be obsolete by the time you get to them. Problem is choosing which half ;)
| 3:03 pm on May 1, 2003 (gmt 0)|
Setting display: block on the anchor within the cell ought to give the same impression as the entire cell rolling over, iirc. Its been a while since I tried it.