default window target name - HTML

Discussion in 'OT Technology' started by dissonance, Dec 5, 2007.

  1. dissonance

    dissonance reset OT Supporter

    Joined:
    May 23, 2006
    Messages:
    5,652
    Likes Received:
    1
    Location:
    KS
    So, I have a page built with framsets. I want a link within the Display frame to change the whole browser's window when clicked, not just the display "sub"frame. Is there a default Target="default_window" or any other simple way to do this?

    (I'm also not trying to create a new window)
     
  2. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    <a href="..." target="top">asdfasdfasdf</a>

    Alternately...

    <a href="..." onclick="javascript:var browser = window.top; browser.src = this.href; return false;">asdasdfasdf</a>

    www.w3schools.org
     
  3. dissonance

    dissonance reset OT Supporter

    Joined:
    May 23, 2006
    Messages:
    5,652
    Likes Received:
    1
    Location:
    KS
    hmmm, when I try them out they don't work. The Target one opens a new window and the java one does nothing, not even send me to the link. Normally their stuff works as described. What did you search for when you looked... I didn't know what to search for.
     
  4. whup

    whup I wish you had children and.. so that I could step

    Joined:
    Feb 12, 2007
    Messages:
    1,603
    Likes Received:
    0
    You want "_top" not "top" as the target
     
  5. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    Open Google and do a search for "html anchor target property". Is this hard?
     
  6. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    Why do they do that? Put underscores on shit? It makes no sense.
     
  7. whup

    whup I wish you had children and.. so that I could step

    Joined:
    Feb 12, 2007
    Messages:
    1,603
    Likes Received:
    0
    Obviously it was too hard for you :mamoru:
     
  8. whup

    whup I wish you had children and.. so that I could step

    Joined:
    Feb 12, 2007
    Messages:
    1,603
    Likes Received:
    0
    It's common sense. Lots of global/shared functions and vars in various languages use this approach to prevent name clashes.
     
  9. wizziebaldwin

    wizziebaldwin New Member

    Joined:
    Nov 30, 2007
    Messages:
    60
    Likes Received:
    0
    naming conventions

    Microsoft is the WORST about not following good software design.

    They use common naming terms like date, time, len, etc. in ALL of their development products.

    An interesting language is LSL in Second Life. most, if not all, of the built in functions start with "ll". Here's an example from the LSL wiki

    LSL is probably one of the best at keeping their functions set apart from what the developer may want to use in terms of naming conventions.

    Older VAX/VMS system that employed VAX-C were good too. They used $ signs and underscores too I think.

    I don't know how many times i have been stung with Microsoft's horrible coding standards for their developer products ... too many to count
     
  10. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    I pulled my first post from memory. I forgot an underscore. Sue me.
     
  11. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    You shouldn't be using a generic variable name like "date" anyway. Use "Today" or "EndDate" or something descriptive.
     
  12. dissonance

    dissonance reset OT Supporter

    Joined:
    May 23, 2006
    Messages:
    5,652
    Likes Received:
    1
    Location:
    KS
    hey!!!! that works, thanks
     
  13. whup

    whup I wish you had children and.. so that I could step

    Joined:
    Feb 12, 2007
    Messages:
    1,603
    Likes Received:
    0
    No problem, happy to help.
     
  14. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    Yeah, whup corrected me earlier.
     

Share This Page