Results 1 to 22 of 22

Thread: table problem / resolution help

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    Michigan
    Posts
    143

    table problem / resolution help

    go here http://www.thecentralword.com/goodcopy1.html

    how do i get that whole table to center in the middle and stay in the middle in every resolution.

    its kinda fine in 1024x768 but when i switch resoultions to higher, i get all that red space on the right, and the table gets kinda smaller.

    how do u avoid this? my tables are centered and ive tried <center> already and stuff.

    hmmm

  2. #2
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Code:
    <table ... align="center" ...>
    Also, in your <div> tag you set the width to over 900px, which is going to cause horizontal scroll bars in resolutions like 800x600.

    I'd consider using %'s

    Code:
    <table ... align="center" style="width: 95%" ...>
    And the <center> tag is deprecated. Use <div align="center">
    My evil laugh has a squeak in it.

    kristopherwilson.com

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    Michigan
    Posts
    143
    pefect! I got it !!!! thanx dude!

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    Michigan
    Posts
    143
    Goto the same page everyone

    u know where the poll is? if u click on vote or view results, it takes u to the same window with the results. Well now it takes u to a new IE window with the results, but thats only cuz i made it do it that way cuz I cant figure out how to keep it in that same frame or table i have it in now

    so how do i make the results stay in that little window I have the poll in?

  5. #5
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    You'd probably have to get into some php or SSI to include different files to show there. You can't make it just appear there unless you use some sort of frame or layer or something.

    I'd just open it in a new window, but make it smaller, like this:

    Code:
    <!-- in the <head> section of your site -->
    <script language="javascript" type="text/javascript">
    <!--
    var win = null;
    
    function popup(mypage,myname,w,h){
    
      settings='width='+w+',height='+h+',top=0,left=0,scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
    
      win=window.open(mypage,myname,settings);
    }
    // -->
    </script>
    
    <-- for your link -->
    
    <a href="#" onClick="popup('url.html', 'results', 200, 200);">View Results</a>
    Something like that.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    Michigan
    Posts
    143
    and substitute which values? the width and height?
    and then the <a href="#" onClick="popup('url.html', 'results', 200, 200);">View Results</a>


    b.t.w thats what the poll is, its a cgi script, so mabe i can edit the script or something to allow it?

  7. #7
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    The code I gave you is JavaScript, not CGI.

    Replace url.html with the url of the results page. leave name alone, and replace the first 200 with the width you want the window to be, and the second with the height you want the window to be.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    Michigan
    Posts
    143
    that doesnt like work man, cuz my results are displayed in the pl file, not an html file.

    goto this and click on view results

    http://www.thecentralword.com/goodcopy1.html

    it'll open up the script *.pl not an html file

  9. #9
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    It doesn't have to be an html file...
    My evil laugh has a squeak in it.

    kristopherwilson.com

  10. #10

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    Michigan
    Posts
    143
    so what goes in href"#"

  11. #11
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by chugger93
    so what goes in href"#"
    Nothing does.

    Do it like this:

    Code:
    <a href="#" onClick="popup('http://www.thecentralword.com/cgi-bin/survey/result.pl?id=1', 'results', 200, 200);">View Results</a>
    The # tells the browser to keep it on the same page. In fact, #null might work better, but I can't remember. One of them will make your page scroll to the top, but it's not really a big deal.

    And I haven't looked through your site, but judging by the colors and the word Central, does this have something to do with CMU?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  12. #12

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    Michigan
    Posts
    143
    yup, CMU its gonna be our new intro page. So Im trying to get things right. But I dunno the advanced things of html. I just do what I know, so....

    Why, u goto CMU?

  13. #13
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by chugger93
    yup, CMU its gonna be our new intro page. So Im trying to get things right. But I dunno the advanced things of html. I just do what I know, so....

    Why, u goto CMU?
    No, althought I did attend band camp there for my four years of high school.

    I'm going to GRCC for a couple of years to get some required classes out of the way for cheap and try to figure out what I'm going to do with my life.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  14. #14

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    Michigan
    Posts
    143
    well I dunno, it didnt work, even when i tried #null

    bseides, thats only for the view results. What if the user actually votes, itll still take em to a new page

  15. #15
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by chugger93
    well I dunno, it didnt work, even when i tried #null

    bseides, thats only for the view results. What if the user actually votes, itll still take em to a new page
    What do you expect it/want it to do?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  16. #16
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    What happened when you tried it? What went wrong? And I don't even see the code I gave you on your page?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  17. #17

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    Michigan
    Posts
    143
    oops sorry
    goto

    http://www.thecentralword.com/a.html

    basically it does nothing, it stays on the a.html page and puts a #null after a.html in the goto address bar

  18. #18
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Change the script in the <head> to this:

    Code:
    <script language="javascript" type="text/javascript">
    <!--
    var win = null;
    
    function popup(mypage,myname,w,h){
    
         settings='width='+w+',height='+h+',top=0,left=0,scrollbars=no,location=no,directories=no,status=no,'+
        'menubar=no,toolbar=no,resizable=no';
    
      win=window.open(mypage,myname,settings);
    }
    // -->
    </script>
    And you might want to change your height (the second 200) to 250.

    NOTE: that + sign on the line, not on it's own. It should fix when you copy and paste it.
    Last edited by The Hobo; Oct 2nd, 2002 at 07:22 PM.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  19. #19

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    Michigan
    Posts
    143
    ohhhh it worked! good job dude!

    but now the real problem. how do u get it that way so that when u hit the vote button it does the same thing!

  20. #20
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    This might get confusing, but do this:

    1. Right under the line "var win = null;" put "var which = 1;"
    2. For each of these tags:

    Code:
    <input type="radio" name="response" value="#"
    Make it look like this:

    Code:
    <input type="radio" name="response" value="1" onclick="which=#">
    Where # is the number in value.

    3. Replace your <input type="submit" ...> with:

    Code:
    <input type="button" onClick="popup('http://www.thecentralword.com/cgi-bin/survey/survey.pl?id=1&response=' + which, 'vote', 200,250);" value="Vote!">
    And it should work fine.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  21. #21

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    Michigan
    Posts
    143
    dam ur good!

    Where did u learn all this anywayz?

  22. #22
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by chugger93
    dam ur good!

    Where did u learn all this anywayz?
    Many years of really long nights...
    My evil laugh has a squeak in it.

    kristopherwilson.com

Posting Permissions

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



Click Here to Expand Forum to Full Width