SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast trevor's Avatar
    Join Date
    Apr 2002
    Location
    Outer Banks, NC
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    controlling a window's attributes from a "normal" link

    hello - i'm wondering how can i control a browser window's attributes (address bar, status bar, height, width, etc.) from a link that you could email someone? i'm not even sure if this is possible.

    in other words, i know how to make it work from a link on a webpage. i use dreamweaver and there is the 'open browser window' behavior which you can set those attributes. but doing it that way requires a line of code up in the head of the document, as well as a line such as:

    <a href="#"onClick="MM_openBrWindow('ctabanner.htm','','status=yes,width=725,height=225')">

    anyway, i don't think this would work.

    but can you control those things from within just a normal URL that you could email someone, such as:

    hi - check out my site. it's
    http://mydomain.com/page?=status=yes...=250,width=400

    i hope my question makes sense... (by the way, i realize that the syntax is incorrect above, but i figured you'd know what i meant)
    Trevor Glimpse
    trevor@gcp.com

  2. #2
    trip ket's Avatar
    Join Date
    Feb 2004
    Location
    Portugal
    Posts
    327
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    KodeKrash, not everyone knows/wants to know JS, its not like it is common-knowledge :P and you didn't even answer his question. (about the e-mail)

    trevor, I think you already know the code KodeKrash showed you opens the link in the window, but you can still have more properties, such as scrollbar, titlebar, etc.

    here's the code with more properties..

    Code:
    <a href="#" onclick="javascript:window.open(link.html', '', 'location=0,menubar=0,scrollbars=0,status=0,titlebar=0,toolbar=0,top=50,left=50, width=600, height=620')"> link </a>
    Now about the e-mail, I'm almost sure that it won't work if you send an e-mail with the example you posted ( hi - check out my site. it's
    http://mydomain.com/page?=status=ye...t=250,width=400 ). You should test it.. Maybe if the e-mail is html formated it can work, but seriously, I'm not sure.

    Another thing you can do is make an "intro" page with a link to your site using the code I posted. That way will work for sure.
    oi!

  3. #3
    SitePoint Enthusiast trevor's Avatar
    Join Date
    Apr 2002
    Location
    Outer Banks, NC
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the responses, but i can't see either example of code. there is a field for it but it looks empty. is there some sitepoint setting i don't have correct?
    Trevor Glimpse
    trevor@gcp.com

  4. #4
    trip ket's Avatar
    Join Date
    Feb 2004
    Location
    Portugal
    Posts
    327
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's the code I posted eaerlier without the code tag so you can see it:

    <a href="#" onclick="javascript:window.open(link.html', '', 'location=0,menubar=0,scrollbars=0,status=0,titlebar=0,toolbar=0,top=50,left=50, width=600, height=620')"> link </a>
    oi!

  5. #5
    SitePoint Enthusiast trevor's Avatar
    Join Date
    Apr 2002
    Location
    Outer Banks, NC
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks alot ket - i'll give it a shot
    Trevor Glimpse
    trevor@gcp.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •