Find the answer to your Linux question:
Results 1 to 7 of 7
Hey, I never looked into HTML or webscripting.. (Ok Ive done some perl.. but aside from that) And now I need to show a webpage without redirecting. I need to ...
  1. #1
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,422

    Basic HTML(?) Scripts..

    Hey,
    I never looked into HTML or webscripting.. (Ok Ive done some perl.. but aside from that)

    And now I need to show a webpage without redirecting.
    I need to show ../../../mypage/almost/thisone.html
    How can I do that that all the basic webbrowsers support it? (InternetExplorer, Firefox, Opera, Konqurer and Safari)?

    It has to show that page 100%.
    BUT, it has to put some Buttons on it. But I figured out that I can do that with CSS..

    I thought that the (Pseudo) code should be something like

    <LINK>MYPAGE<LINK> (This is the part I dont know)
    <DIV><CreateButton></DIV> (Create Button doenst exict but I do that to draw the concept)
    <DIV><CreateAnotherButton></DIV>

    Well, how can I do the linking thing? and I can do that with the buttons with CSS and DIVS right?

    Sorry for my extreme low knowledge about HTML + CSS..
    I just aint intrested into remembering it.. -.-' (Gimme perls, C++ or a bit low level assembler ;P)
    New Users, please read this..
    Google first, then ask..

  2. #2
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    I'm afraid I don't actually know what you're asking.

    Basically, you have a page and want to create a hyperlink to another page? Then you just use:
    Code:
    <a href="otherpage.html">link text</a>
    Or do you want to actually embed another page's contents into the current one? This is best done by using a serverside scripting language, but you could theoretically use an iframe.

    I suggest you read the W3C's HTML tutorial:
    HTML Tutorial
    DISTRO=Arch
    Registered Linux User #388732

  3. #3
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,422
    heh thanks I ment the second one.
    So serverside. No biggy that can be done.. ^^

    Ive dont a couple HTML tutorials already, though I just dont like to do it..
    I keep forgetting stuff..

    Im going ot check if Perl has such a function.
    Thanks. (and else Im going to look inot the iframes)

    Later on:
    Ive made this script:
    <html>
    <head>
    <style>p.cssClass{ position: relative; top: 30px; left: 50px; }</style>
    </head>
    <body>
    <IFRAME>../../mypagedir/mypage.html</IFRAME> <!--Find Perl/PHP Replacement--!>
    <p class="cssClass"><form method="post" action="DOSOMETHING" ><input type="submit" value="Advance Mode" /></form></p>
    </body
    </html>

    I had to use tutorials.. I just cant remember HTML for some reason..
    And I guess this is still wrong.. =P
    Why isnt C(++) also for websites?...(I know php/perl are close.. learning Perla and PHP atm)
    New Users, please read this..
    Google first, then ask..

  4. #4
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    You use an iframe by using:
    Code:
    <iframe src="otherpage.html"></iframe>
    It is documented at:
    HTML IFRAME TAG

    You can use any programming language as a serverside application. You just need to instruct your server to execute such a program and use its ouptut as the page. This is exactly what Perl CGI scripts and PHP do.

    For instance, this C program would create a basic web page:
    Code:
    #include <stdio.h>
    
    int main()
    {
        puts("<html><body>Welcome to my page!</body></html>");
    
        return 0;
    }
    You would compile this and use it.

    To do it in PHP would basically be:
    Code:
    ...
    
    <?php
    
    include 'otherpage.php';
    
    ?>
    
    ...
    DISTRO=Arch
    Registered Linux User #388732

  5. #5
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,422
    Wait, that what you tell me about C intrests me.
    Do I have to compile it and make it lisern to a port or what is the exact idea of that?
    New Users, please read this..
    Google first, then ask..

  6. #6
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    Check this link:
    Getting Started with CGI Programming in C

    Basically, any program that can produce output and can be executed by the server can be used to generate a webpage. Now, as chance would have it, it is FAR more difficult to do this with C than it is with, say, PHP, as PHP was designed specifically for this purpose.

    However, if you can get your server to execute the program, it will work. The link explains it and uses examples and all.
    DISTRO=Arch
    Registered Linux User #388732

  7. #7
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,422
    Hey, thanks dude.
    I really like ths ^^
    I guess its still not an Active Language? But static?
    New Users, please read this..
    Google first, then ask..

Posting Permissions

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