www.webdeveloper.com
Recent Articles
  • Finding Slow Running Queries in ASE 15
  • A More Advanced Pie Chart for Analysis Services Data
  • Adobe AIR Programming Unleashed: Working with Windows
  • Performance Testing SQL Server 2008's Change Data Capture Functionality
  • The ABC's of PHP: Introduction to PHP
  • How to Migrate from BasicFiles to SecureFiles Storage
  • Why the Twitter Haters Are Wrong
  • User Personalization with PHP: Beginning the Application
  • Whats in an Oracle Schema?
  • Lighting Enhancement in Photoshop
  •  

    Go Back   WebDeveloper.com > Client-Side Development > JavaScript

    JavaScript JavaScript (not Java) Discussion and technical support, including AJAX and frameworks (JQuery, MooTools, Prototype...)

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1  
    Old 01-25-2006, 01:27 PM
    Ireallyneedhelp Ireallyneedhelp is offline
    Registered User
     
    Join Date: Jan 2006
    Posts: 3
    A noob needs help

    Hello everyone,
    thankfully I found this forum, I hope you guys can help me.

    Let me start out by saying that I know abosolutly nothing of Javascript. I admire all of you who have mastered it or know how to use it, so I ask for your help.

    My situation is this: (I'll try to make a long story short)

    I am making a website for a paintball place that opened in my city (I am in Brazil). My site is amature stuff, but its not that bad. Its not up yet, though.

    The website is ready, and the owner of the paintball place had an idea. He wanted me to put a little "screen" (window, popup, I dont know the word) on the top right of the page, so that new offers could be posted there, like discounts for groups, tournaments and etc. There should be a little X button to close that screen.

    I was searching for examples, and I came across the perfect one. I visited some cjb.net website, and there was their ad screen on the top right, just like how I wanted it. I opened their Source window and Ctrl+C it. (very lame I know)

    So, I have been messing with it, and I got it to look like what I want. Here is my html code:

    Quote:
    <html>
    <head>
    <style>.adHeadline
    {color:#0000ff;font-family:arial;font-size:12px;text-decoration:underline}
    .adText{color:#000000;font-family:arial;font-size:12px;text-decoration:none}
    </style>
    </head>
    <body bottommargin="0" leftmargin="0" marginheight="0" marginwidth="0" rightmargin="0" scroll="no" topmargin="0">
    <iframe frameborder="0" height="100%" src="index2.html" width="100%">
    </iframe><div id="target" style="position:absolute;right:0;top:0">
    <table cellpadding="1" cellspacing="1"><td bgcolor="#000000">
    <table cellpadding="1" cellspacing="1"><td bgcolor="#329900">
    <table cellpadding="1" cellspacing="1" width="100%"><td align="left">
    <font face="verdana" size="4" color="white">SUPER PROMOÇÃO !</font>
    </td>
    <td align="right" bgcolor="#d4d0c8" width="1">
    <a href="javascript:void(0)" onClick="document.all.target.style.visibility='hidden'" onMouseOut="window.status='';return true" onMouseOver="window.status='';return true" style="color:#000000;font-family:arial;font-size:12px;font-weight:bold;text-decoration:none">X</a>
    </td>
    </table>
    </td>
    <tr>
    <td bgcolor="#ffffff">
    <font face="verdana" size="2" color="#3333cc">
    Você trazendo mais 9 amigos, a sua <br>
    entrada é gratúita! Com um total de <br>
    10 pessoas, o organizador do grupo <br>
    ganha um Kit Game (arma, mascara, <br>
    bolinhas, gás, etc.) de graça. <br>
    <b>Organize a sua turma e venha!</b></font>
    </td>
    <tr>
    <td bgcolor="#329900">
    <table cellpadding="1" cellspacing="1" width="100%">
    <td align="left">
    </body></html>
    NOTE: both of the words "target" were originally "cjb1138199577". I changed just to look better.

    When I click to preview the site, everything works perfectly. However, it does not work properly when I open the HTML file. When I open my site on IE, I get a message that says " To help protect your security, Internet Explorer has restricted this file from showing active content that could access your computer. Click here for options...". When this happens, I cannot close the little screen by pressing on the X.

    Also, that onClick segment of the code is very "sensitive". Any little part your take out (document.all.target.style.visibility), the X does not work anymore in preview mode.

    This same screen works perfectly when I visit the cjb website, but now it does not work for me.

    Is there any way you guys can help me? I really want to make this little "announcement corner window" work. What should I do so IE will not block it from working?

    Thank you very much for your time and help
    //Daniel
    Reply With Quote
      #2  
    Old 01-25-2006, 01:58 PM
    konithomimo konithomimo is offline
    Registered User
     
    Join Date: Jan 2005
    Posts: 3,071
    1. You don't close any of your tables.
    2. That 'window' as you call it is just a div with an X in the corner and some text. That can be put anywhere.
    3. It might be easier to just use a popup, because then you can just change the text on a page instead of having to sort through your main page to edit the text.
    Reply With Quote
      #3  
    Old 01-25-2006, 04:37 PM
    Ireallyneedhelp Ireallyneedhelp is offline
    Registered User
     
    Join Date: Jan 2006
    Posts: 3
    The one I am hoping to create would be the number 2 on your list. (div with an X)

    "div" is short for something? Maybe I can search for it at other sites also to obtain additional help.

    What does div mean?
    Thanks

    //Daniel

    Last edited by Ireallyneedhelp; 01-25-2006 at 04:54 PM.
    Reply With Quote
      #4  
    Old 01-25-2006, 05:21 PM
    konithomimo konithomimo is offline
    Registered User
     
    Join Date: Jan 2005
    Posts: 3,071
    A div is what you use for document "division". Meaning breaking your document into seperate parts so that you can effect certain parts at certain times without having to effect all of your document. notice the

    <div . . .

    in your code. That is a div. Basically it is a box that you put other code into. In the case of your code, you made the box, put some tables in it, gave it a border,and then put in some text for a title, along with a link with only an

    X

    as the value for it, thus closing the div . . . making it invisible.
    Then you added in your other text, and that was it.

    it takes less than 5 minutes for most programmers to make that. There are many tutorials on divs out there. Here are a few:

    http://www.w3schools.com/tags/tag_div.asp
    http://www.htmlcodetutorial.com/_DIV.html

    Last edited by konithomimo; 01-25-2006 at 05:23 PM.
    Reply With Quote
      #5  
    Old 01-26-2006, 08:15 AM
    Ireallyneedhelp Ireallyneedhelp is offline
    Registered User
     
    Join Date: Jan 2006
    Posts: 3
    Thanks man for the help
    //Daniel
    Reply With Quote
    Reply

    Bookmarks


    Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
     
    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    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 Off
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 04:19 PM.



    Acceptable Use Policy


    The Network for Technology Professionals

    Search:

    About Internet.com

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

    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.