|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
window.open question
Hi there,
I have found some tutorials on opening pop-up windows. One has said that there is good and bad javascript to do this, good being code that accommodates a browser without javascript recognition. This tutorial has suggested writing the pop up window like this: <a href="file.htm" onclick="window.open(this.href); return false;">click here</a> This works a treat and i get the logic behind it being good code. But it didn't explain how to add the variables, such as sizing, adding/removing bars, etc. I have a list of the variables, and understand how to impliment them in the code which was deemed 'bad' (or i guess is alternative) but can't figure out how to attach them to this code above. Could anyone please point out how to do it, or a link to a tutorial which has this information? Many thanks, Jules |
|
#2
|
||||
|
||||
|
Try something like:
<a href="file.htm" onclick="window.open(this.href, null, "height=200,width=400,status=yes,toolbar=no,menubar =no,location=no"); return false;">click here</a> This is a good reference for what to put in those options. |
|
#3
|
|||
|
|||
|
Thanks for the try, but it didn't seem to work. tried a few variations and still no joy.
Another question though. I found another method: <a href="javascript:location='../index.htm';window.open('../HELPplayerlinks.htm', 'RealPlayer Links', 'height=400, width=420, chrome=yes, scrollbars=yes')">Get a free copy of RealPlayer</a> which worked a treat in NN but IE just kept on returning to the location page (ie the index)... Any suggestions, cheers, Jules |
|
#4
|
|||
|
|||
|
Ok, it is very possible (due to not knowing Javascript) that i misinterpreted your post... apologies, but i have found the code in a tutorial, and it appears to work on both IE and NN. It is:
<a href="../HELPplayerlinks.htm" onClick="window.open('../HELPplayerlinks.htm', 'volc', 'status,resizable,scrollbars,width=420,height=300' ); return false">Get a free copy of RealPlayer</a> it appears that by losing the this.href and replacing it with the url again, it works. Thanks though. Jules |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > window.open question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|