Forums | Email a Colleague | FAQ

Dr. Website Archives

Dr. Website® Archives 2002

June 6, 2002
    Question:
    I have a problem with my chatting room, in this case i would like to detect weather my opposite chat member has leaved the chat room, just say the member close the chat window (new open window than its main window) and i want to detect if the popup window has closed or not. Could you help how to do this.
    thank you,

    Answer:
    This would depend on the scripting language you're using for your site, and how much control you have over the chat application. You could use the onClose() event to execute a bit of ASP code which writes to your web server, and your end of the chat application polls for that specific bit of info each time you submit data to the chat app. Then it could show you "Elvis has left the building," so to speak.
    Again, the particulars depend on the methodology you are currently using.
    Thanks

    --Dr.Website

    Question:
    My Web page is designed using frames, and I have a problem. When a search engine or link from an external site links to one of the pages within my site (i.e., not the home page), the frame gets lost. I've visited some other frame sites (Microsoft included), and it seems to be the same all over. In many instances people want to link to an internal page in my site and not the home page. How can I get these pages to build a frame around themselves?
    Thanks

    Answer:
    You can achieve this by adding this bit of script to the pages you wish to keep within their frames:

    if (top == self) self.location.href = "theframeset.html"; Dear Dr. WebsiteŽ: I'd like to be able to have a user click on a link to execute a query, using a URL that points to a government search engine, and I'd like the results to pop up in a window when the user clicks on the link. Is this possible? You can use a function accompanied by a JavaScript link to open a new window that contains the results of the query:

    <SCRIPT LANGUAGE="JavaScript"> <!--// function openit(sURL){ newwindow=open(sURL,"newwin","scrollbars=yes,toolbar=no,directories=no,menubar=no,

    resizable=yes,status=yes,width=600,height=500"); } // </SCRIPT>

    Use a JavaScript link to the function, like this:

    <A HREF="javascript:openit('http://www.sec.gov/cgi-bin/srch-edgar?Cube+adj+Microsystems')">open results window</A>
    Thanks

    --Dr.Website

    Question:
    Dear Dr. Website: Is there HTML or JavaScript code that can change any or all of the link colors anywhere within a single HTML page? I'd like to use light-colored links on a black menu panel and then change them to dark-colored links on white for the content area.

    Answer:
    Neither JavaScript nor HTML, but Cascading Style Sheets to the rescue. All you have to do is something like this before the first area:

    <style> A:link { background: black; color: white; } A:visited { background: black; color: yellow; } A:active { background: black; color: cyan; } </style>

    and like this before the second:

    <style> A:link { background: white; color: blue; } A:visited { background: white; color: red; } A:active { background: white; color: brown; } </style>
    Thanks,

    --Dr.Website ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ForumsEmail a Colleague · FAQ

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs