The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
I'm having difficulty getting a Pop Up Window to work
Hi!
I'm having some difficulty getting a link to open a Pop Up Window. Here's what I'm using: HTML Code:
This is the Regular Link: (<a href="showthread.php?$session[sessionurl]do=testaction&t=$threadid">Execute Test Action</a>) This is what I'm trying to modify it to, in order to get it to open in a Pop Up Window: (<a href="#" onclick="showthread.php?$session[sessionurl]do=testaction&t=$threadid; return false;">Execute Test Action</a>) Obviously, I'm making a mistake. Can someone help me figure out what I'm doing wrong? Thanks! |
#2
|
||||
|
||||
Quote:
|
#3
|
||||
|
||||
Quote:
I don't really need to disable anything (except maybe the Status Bar - similar to how the Who Posted pop up does it), and I would like it to remain resizeable (if the user should drag out the lower right corner of the window). |
#4
|
||||
|
||||
Zachery, does this mean that you know where I went wrong?
|
#5
|
||||
|
||||
PHP Code:
You can also add other options after the width, height statements but still in the parenthesis to specifry which options you wanna turn on (status, resize, etc) - thje exact wording for these you can find on w3schools.com (I always rtfm, rather than using up precious memory space in my head with the exact wordings...) |
#6
|
||||
|
||||
Quote:
I have a few questions, though... 1. The syntax I originally tried, I have seen used before successfully. I recall its being recommended as it bypassed Javascript - and thus, wouldn't cause problems for people who had it turned off. If that's true, why didn't it work for me? 2. I tried your suggested syntax, and I have mixed results. The good news is that it does indeed open a Pop Up. The bad news is that the width and height settings seem to be ignored. Do they need to be specified differently? Thanks again! |
#7
|
||||
|
||||
1] Your original code is
PHP Code:
PHP Code:
2] OK: the structure of the window.open() function is as follows... Code:
window.open(this.href,this.target,"toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=yes, width=400, height=400") The structure can be broken down into three arguments: link URI, window name (same as target), and features. Link can be either a quoted URI (eg "forumdisplay.php?f=1342") or a legal DOM reference (aka this.href refers to the contents of the href statement in this a tag... ). Window Name similarly can be either a quoted value for the window name (eg "_blank", "mypopup") or a legal DOM reference (aka this.target refers to the target field in this a tag... ). This example above uses the extended version of the code for features, the only features that require a name=value structure are width and height, the others you only need to include a feature name if you wish it to be active. So: your code should be PHP Code:
Final Note: A funky implementation or this is in the following example... PHP Code:
HTH |
#8
|
||||
|
||||
Quote:
Thank you for your excellent help! |
#9
|
||||
|
||||
My pleasure: javascript is really your friend these days: so powerful in combination with PHP and a database...
|
#10
|
||||
|
||||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|