Help - Search - Members - Calendar
Full Version: Pop-up box help
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
tharpdevenport
Okay, I wanted to try something new, given that I know about half of what I was trying to do, so I thought it would be a simple copy and paste, and edit styles where necessary. I was wrong.

On this page: LINK

I wanted multiple pop-up boxes for individual IDs. Go to Alan Elliott, and tell me why, just why won't the box pop-up?


Also, as an addendum, how can I make it pop-up just right of the text you hover over, so I don't have to position TOP and LEFT. Just an automatic thing.


Thank you for any help. :-)
jimlongo
For starters your link is to java script:// instead of a webaddress.

href="java script://"



Look at Scott Salinas just below the href="someimdbpageforthecomposer.com"
tharpdevenport
QUOTE(jimlongo @ Oct 25 2006, 09:38 PM) *

For starters your link is to java script:// instead of a webaddress.

href="java script://"



Look at Scott Salinas just below the href="someimdbpageforthecomposer.com"


Well, to show my ignorance, I copied and pasted from a totorial and they made it seem like I didn't need to alter that, plus the pop-up boxes are not new pages, but info in the HTML of that page. In DIVs that are visable when you put your mouse on what ever I want to have a pop-up.
jimlongo
Glad you got that sorted out.

A bigger problem you are having, and I assume it's something to do with your server, is that most times I access your pages they are served as plain text in my browsers . . . in other words I see the source code instead of the page.

I'm not sure what causes that to happen, perhaps someone else will see this thread and know the answer to that or perhaps you should start another thread.
Darin McGrew
Hmm... Which page shows up as text/plain for you? I've never see anything other than text/html when I retrieve http://www.davidnewmanfilmmusic.150m.com/factoids.html
tharpdevenport
I never have a problem, views fine.

Internet Explorer 6, windowsXP on this computer. Site was designed, and viewed fine, when using one on Windows2000 and IE4.
Darin McGrew
QUOTE(jimlongo @ Oct 25 2006, 09:38 PM) *
For starters your link is to java script:// instead of a webaddress.

href="java script://"
QUOTE(tharpdevenport @ Oct 26 2006, 04:03 PM) *
Well, to show my ignorance, I copied and pasted from a totorial and they made it seem like I didn't need to alter that
Whenever you start to use href="java script:..." in a link, it will cause problems when JavaScript is disabled/unavailable.

In this case, it looks like you use CSS to hide content, but JavaScript to reveal it. It would be better to use JavaScript to both hide and reveal the content. That way, when JavaScript is disabled/unavailable, the content isn't hidden with no way to reveal it.
tharpdevenport
Let me make it real easy: I have no clue about java.
jimlongo
QUOTE(Darin McGrew @ Oct 26 2006, 07:45 PM) *

Hmm... Which page shows up as text/plain for you? I've never see anything other than text/html when I retrieve http://www.davidnewmanfilmmusic.150m.com/factoids.html


At least half the time when I go to the OPs link I get this - I thought it might be a cache issue, but it just happened again . . . in more than one browser.
IPB Image
Darin McGrew
Weird... I just reloaded the page a bunch of times. I never got the text/plain version, but I noticed that the header at the top of the page looked slightly different each time.
jimlongo
QUOTE(tharpdevenport @ Oct 26 2006, 08:11 PM) *

Let me make it real easy: I have no clue about java.


So just use regular links. The thing is you want a pop-up and that is only accomplished by javascript. The other method is a regular link with <a href="somewebsite.html" target="_blank"> but this only validates with html transitional, it's a deprecated method of opening another window.

The other way to do this to ensure everyone gets your link is
HTML
<a href="mygreatwebpage.html" target="_blank" onclick="java script:open (this.href); return false">
THis is the Link</a>

this has a regular href with a target for people with javascript disabled and a javascript call for those who allow it.
jimlongo
QUOTE(Darin McGrew @ Oct 26 2006, 08:46 PM) *

Weird... I just reloaded the page a bunch of times. I never got the text/plain version, but I noticed that the header at the top of the page looked slightly different each time.


Yeah, of course now I can't get it to happen again wacko.gif
tharpdevenport
but I'm not using links. Here is the page I got this from, and you can see the example:

LINK
jimlongo
Yes you're using links - for instance Scott Salinas has a LinK to IMDB.

What you want to do is make a link to Man of the House. Let's start simply with a link.
http://htmlhelp.com/faq/html/links.html#link-howto

CODE

<a  href="manofthehouse.com">Man of the House</a>
tharpdevenport
What I mean is, that I'm not opening up a new page that happenss to be a pop-up box, as the link shows, it's in a hidden DIV that pops up when you place it over the appropriate item that been made to do so.

I don't know what I'm doing wrong, why it won't just work like at the site provided.
jimlongo
I see what you're trying to do . . . you just have to follow the example a little more closely. It probably has to do with the CSS - your document doesn't seem to have the same as their example. Look at the source for the FLAG page, forget the tutorial I found it confusing.

But as Darin said, people without javascript enabled won't see anything at all.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.