
|
View Full Version : Web Design Question
David-WWH 05-31-2002, 03:05 PM I apologize if this is not the right forum to post this message in, but I couldnt find one that was more appropriate.
I was wondering if any of the web designers out there might help me figure this one out.
I am setting up a page to describe my hosting plans. What I want to do is create a link that makes a new explorer window pop up with a short description in it. I know how to have a link open a new browser window, but I want a window with just a title bar in it - not a whole browser window. In other words, when they click on an image to learn more about a plan, a small window pops up with a description of the plan. The window only has a title bar and the text area.
Anyone know how to do this? I am using Dreamweaver, by the way.
Thanks, in advance!!
Regards,
David Harris
WorldWideHosting.net
mwatkins 05-31-2002, 03:09 PM Easy...
Define a function:
<script type="text/javascript">
<!--
function awindow(url){
return window.open url, "thewindow", "toolbar=no,width=600,height=480,status=no,scrollbars=yes,resize=no,menubar=no");
}
-->
</script>
You can tweak the parameters to your liking.
Calling the window:
<a href="/path/to/your/file.html" target="_blank" onclick=
"awindow('/path/to/your/file.html');return false">Your Link Text</a>
By the way, if a user has run script turned off in their browser, or an old browser or a text browser, then it will simply open a standard blank window.
David-WWH 05-31-2002, 05:31 PM Thanks for your response, mwatkins!
I notice that you had the path-to-file in there 2 times. Is this the path to the new window? Should the paths be the same in there? I am trying to figure out where the img src tag should go...
Thanks again, I really appreciate it!
David
David-WWH 05-31-2002, 05:37 PM Still trying to figure this out - I do not have ANY experience with java. Where do I define the script? Do I do it at the head just once? Or do I define it each time for each link on the page?
Thanks again!
David
mwatkins 05-31-2002, 06:30 PM 1 - define the script only once. Its a function call that can be called from elsewhere within the document.
2. Loading an image would be like so:
<a href="/images/mydog.gif" target="_blank" onclick=
"awindow('/images/mydog.gif');return false">Click to see a picture of my dog pop up in its own nice little window</a>
Does this help?
David-WWH 06-01-2002, 03:14 AM Hello again!
Well, I think I am getting closer, but the problem is that a complete browser window is popping up - toolbar and all.
If you want to take a peek at what I did, you can go here:
http://worldwidehosting.net/plans-test.html
If you click on the image "starter plan" you will see what I mean.
Any idea what I am doing wrong?
Thanks again for the help.....
Regards,
David H
alpha 06-01-2002, 04:18 AM onClick="window.open('http://www.yourpage.com/page.htm','newwindow','width=400,height=200')"
its the same thing, except its not defining a window open function like mentioned before, it seems like the window open js script function is having trouble anyways...
so it'll basically be:
<a href="#" onClick="window.open('http://www.yourpage.com/page.htm','newwindow','width=400,height=200')">Pop up thing!</a>
alpha 06-01-2002, 04:21 AM arg, screwed up the vb table, lol
anyways, another thing, do a search on google,
here's a good site I found: http://tech.irt.org/articles/js128/
mwatkins 06-01-2002, 11:58 AM Simple solution - missing ( brace in the code I shared with you right after the window.open call.
<script type="text/javascript">
<!--
function awindow(url){
return window.open (url, "thewindow", "toolbar=no,width=600,height=480,status=no,scrollbars=yes,resize=no,menubar=no");
}
-->
</script>
p1net 06-01-2002, 12:43 PM Maybe you should take a look at overlib (http://www.bosrup.com/web/overlib/) !! We use it on our Plans page (http://rfhost.com/plans.php) It's not to difficult to configure. :D
Looking for something like this (http://www.waterhosting.com/hosting.html) ?
David-WWH 06-02-2002, 08:08 PM Hello,
I just wanted to thank you all for your input. I finally got it to work - and the tricky part was combining the pop-up with a rollover script. But, It works now. I really like that Overlib thing - I would have used it if I hadnt already used the regular popups - I will keep it in mind for the future, and maybe implement it in other areas of my site.
Thanks again, all!
Regards,
David Harris
|