View Full Version : Java Script Code Help needed
Hurricane
12-30-01, 03:46 AM
Hi guys...
I wrote this need little code, but I wanted the links opened in a new window, not like right now in the same window. What do I have to modify to change that. I need some help from some experts. Any ideas?
Thanks
www.jclemens.com
edited by admins
[Please do not post an entire script here. Make a URL where they can see or dl a text verion]
you can open links in new windows by inserting target=_blank into the link tag like this:
<a href="http://www.powweb.com" target=_blank>Powweb</a>
or you could insert this tag:
<base target="_blank">
in the <head> section to force all links to open new windows.
this is all HTML.. doing it in JavaScript requires a bit more code.
hope this helps.
:)
Hurricane
1-2-02, 04:22 AM
Hi Grahm...I've tried already this...unfortunately no success. Right now I use a totally different code that allows you to navigate in frames and/or in popups. Unfortunately this won't work with Netcrap(lol). At the moment I will try to make it compateble with browsers other than IE. I will post the code here if I found a solution. I would still appretiate the forums imput, maybe we can find an other solution.
Thanks
Hurricane
www.jclemens.com
You didn't ecplain what you were trying to do....
If you're looking to make POP-up..... yes there is a legitimate reason for making popups..... "not just for advertising".....
http://www.hotscripts.com/JavaScript/Scripts_and_Programs/Windows_and_Frames/
You can find generators there that will Write the code for you in many different ways.... as well as how to Close the windows too.... "recommended"......
All depending on what you want to accomplish.... I think you'll find it here..
metalmike
1-20-02, 01:00 AM
http://www.hotscripts.com for quite a bit of Javascript code. You have to Visit the person(s) sites to actually see/get the code which I found strange but hey, what do I know! It's a good resource to bookmark for future endeavours anyways.
Mike
SBGlasby
1-20-02, 07:34 AM
http://www.hotscripts.com is actually a listing & rating site, of scripts of almost any flavor. I think I mentioned that in another post... here... but I guess not this one.....
over 4000 perl scripts and growing daily
They don't have any of the scripts... but if you wanna find it... it's probably listed there, and if it's been around a while, it's probably been rated.... and people write reviews.....
I don't think there is any one site.... anywhere, that would actually have this many scripts... on their site.... it would be impossible to keep up with the newest version of every one of these scripts...
I did a frames page a while back. When a user clicks on a thumbnail the full size image shows in a popup window that is a few pixels larger than the actual image. I also added a border around the pic. This way, the subject was displayed without a lot of extra white space around it and since size was spec'ed but no the other attributes, there are no toolbars on the popup window. Is this what you are looking for? A little javascript did the trick.
In the head I put
<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}
//-->
</script>
In the body i wanted a thumbnail image as a link to a full sized image. Both were in my local Images directory. I gave the page a name. Then I specified the desired size (in pixels) of the pop-up window but did not give it any other attributes like tool or navigation bars.
<img src="Images/thumbnail.jpg" onMouseDown="MM_openBrWindow('Images/fullsize.jpg','fullsize','width=175,height=320')" border="2">
Obviously, your source path should be correct for your site.
I hope this helps some.
Dale
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.