SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Thread: Active Desktop

  1. #1
    SitePoint Member
    Join Date
    Nov 2000
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I hade no idea where to post this so....
    I have made a quick html for an active desktop, but I use
    JavaScript and on the link that activates the script it not
    only activates the script but opens the same page in an
    extra browser.

    eg.
    <a href="#" onClick="rest();">Click Here</a>
    when the user clicks "Click Here" not only is the rest();
    function run but a window with the same html file pops up.
    Is there any code I can pop into my HTML so that no extra
    page is activated, thank you for the help.
    ~ ~
    8-Ball
    ~ ~

  2. #2
    Kat's Meow Senior ******* WebKat's Avatar
    Join Date
    Jul 1999
    Location
    California USA
    Posts
    1,071
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    << ~8Ball~ JavaScript questions best posted in Client Side Scripting forum - moved from Web Page Design...WebKat, Senior Advisor >>
    Dlynn :: SitePoint Senior Advisor ::
    PawPrint Designs by WebKat
    "Dogs come when they're called; Cats take a message and get back to you later." ~ Mary Bly

  3. #3
    Irritability Defined
    Join Date
    Jul 2000
    Location
    80,000 feet below the surface
    Posts
    1,442
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Technically you can try and force it to load in the same window by calling 'target=_top' or parent or similar in your A HREF tag, but I have a suspicion it actually depends on your system settings, which you may not be able to override using HTML or JScript. If your system is set to open stuff in a new window then you'll have to change your settings in Explorer so that everything loads in the same window.

    I might be completely wrong, but this is just a thought....
    My 2 Cents (or is that 2.2 Cents including GST?)

  4. #4
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi 8ball,

    Not knowing what the 'rest()' function does, I can't really give you a definitive answer. However, you can try the following:

    <a href="javascript:rest();">Click Here</a>

    The href value can hold a javascript function; that should prevent a new window from opening. If it doesn't work, try:

    <a href="javascript:rest();void();">Click Here</a>

    The void() method implies that no return value is necessary and that further processing should stop.


    Let me know if either helps out.

    Vinny

    Where the World Once Stood
    the blades of grass
    cut me still

  5. #5
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I don't believe you can open a second page from your Windows desktop using Javascript. Javascript can't update the Display Properties control panel or change the registry.

    You would have to use Visual Basic Script to do this or create an IFrame on your desktop to load documents into via the Javascript.
    Wayne Luke
    ------------


  6. #6
    SitePoint Member
    Join Date
    Nov 2000
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanx BC you were right all I needed to drop in was target="_self" and it work, thanx to the other people too.

    By the way, vincent, the rest function doesn't do anything I was just using it as an example. my real function was say and that was for something unrelated.

    Thanx agin to everone.
    ~ ~
    8-Ball
    ~ ~

  7. #7
    Irritability Defined
    Join Date
    Jul 2000
    Location
    80,000 feet below the surface
    Posts
    1,442
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Glad to be of assistance.... It was just a hunch btw
    My 2 Cents (or is that 2.2 Cents including GST?)


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
  •