Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-26-2004, 10:07 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 09-26-2004, 10:14 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #3  
Old 09-27-2004, 05:11 AM
Natch's Avatar
Natch Natch is offline
 
Join Date: Nov 2002
Location: Australia
Posts: 851
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There are 2 ways of creating and dealing with popups gracefully:

Simple.
Code:
a href="#" onclick="{mypopupcode}; return false"
The purpose of this is to stop the browser doing the Anchor-jump to the top of the page, looking for the blank a name="" anchor ('cos of a href="#").

Slightly more complex.
Code:
a href="mypopup.html" target="popup"  onclick="if(mypopup(this.href,this.target,popupsettings)) return false"
This one is based on [i]mypopup[/b] being a function you write, not relying on the window.open statement. The function "mypopup" will return NULL if the browser/screen reader/other web tool doesn't support the window.open facility and therfore open the popup page as it would normally do without the popup being there ... but if the function returns something, then the "return false" kicks in and stops the href doing its normal thing, while your pop up is popping away as you designed ...

[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.
Reply With Quote
  #4  
Old 09-27-2004, 10:56 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #5  
Old 09-27-2004, 11:12 PM
Modin Modin is offline
 
Join Date: Jun 2004
Posts: 162
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

looks right to me AN-net, though just throw it in a test page and test it out
Reply With Quote
  #6  
Old 09-28-2004, 12:35 AM
Natch's Avatar
Natch Natch is offline
 
Join Date: Nov 2002
Location: Australia
Posts: 851
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AN-net
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>
HTML Code:
<a href="popup.html" target="popup" onclick="if(window.open(this.href, this.target, 'height=200,width=200')) return false">blah</a>
Try that: but yes the above would work too, you would just have the page behind change as well as popping up in a new window...
Reply With Quote
  #7  
Old 09-28-2004, 12:42 AM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #8  
Old 09-28-2004, 12:54 AM
Natch's Avatar
Natch Natch is offline
 
Join Date: Nov 2002
Location: Australia
Posts: 851
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Far more complex: now you are talking about the DOM and parent / child relationships...

How much knowledge do you have on Javascript?
Reply With Quote
  #9  
Old 09-28-2004, 02:12 AM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i would say fairly little....
Reply With Quote
  #10  
Old 09-29-2004, 01:28 PM
Pitman's Avatar
Pitman Pitman is offline
 
Join Date: Dec 2001
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AN-net
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?
I was wondering the same thing if anyone cares to shed some light on this
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:39 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04365 seconds
  • Memory Usage 2,260KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (3)bbcode_html
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete