![]() |
html help:)
ok well how would i make so when someone clicks a link that leads to a new window, that i can control its width:)
|
to change the size of a window isn't doable with html alone iirc.
you have to use JavaScript for that, and so you'll get some which have disabled that ;) |
There are 2 ways of creating and dealing with popups gracefully:
Simple. Code:
a href="#" onclick="{mypopupcode}; return false" Slightly more complex. Code:
a href="mypopup.html" target="popup" onclick="if(mypopup(this.href,this.target,popupsettings)) return false" [If the above looks like a canned response, it's cos I had it written months ago and it's an aticle on an old website of mine...] So: if you create a javascript function to deal with your popups, have it return true if the popup works - that way you can determine if the javascript works and therefore return false to the regular browser behaviour and not load the link normally, but if the function refturns false, then your regular browser behaviour kicks in and your link still opens in a new window via the target="popup" HTML script. |
would it work like this?:
HTML Code:
<a href="popup.html" target="popup" onclick="window.open('popup.html', 'popup', 'height=200,width=200')">blah</a> |
looks right to me AN-net, though just throw it in a test page and test it out :)
|
Quote:
HTML Code:
<a href="popup.html" target="popup" onclick="if(window.open(this.href, this.target, 'height=200,width=200')) return false">blah</a> |
kool thanks alot:)
now i need another thing, how do i make an action in one window affect another, like vb's attachment system. when you upload something it updates the post window and with the uploaded attachments, how would i achieve this? |
Far more complex: now you are talking about the DOM and parent / child relationships...
How much knowledge do you have on Javascript? |
i would say fairly little....
|
Quote:
|
I had a reason to look into this further just recently...
Well with the DOM, you can refer to a form field by "name" with the following structure: Code:
document.formname.fieldname.value Code:
this.opener.formname.fieldname.value Code:
<a href="#" onclick="this.myform.submit();this.opener.location='newpage.html';this.close();return false">click here to submit, change the parent page to the url defined and then close this window</a> |
i cant get this to work:(
|
Can you point me to where you are trying this, and I'll take a look?
|
All times are GMT. The time now is 01:39 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|