making clickable link without http part?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • xxweekxx
    Confirmed User
    • Oct 2002
    • 6780

    #1

    making clickable link without http part?

    is it possible to make a working link without the http part??

    example:

    <a href="www.google.com"> test </a>

    obviously if u put that in a html file it wont work....
    _________________
    I am the best
  • BradM
    Confirmed User
    • Dec 2003
    • 3397

    #2
    No, it's not possible.

    Comment

    • CyberHustler
      Masterbaiter
      • Feb 2006
      • 28739

      #3
      I think only if you're linking to a page on the same site. You can use a /
      “If you can convince the lowest white man he’s better than the best colored man, he won’t notice you’re picking his pocket. Hell, give him somebody to look down on, and he’ll empty his pockets for you.”

      Comment

      • xxweekxx
        Confirmed User
        • Oct 2002
        • 6780

        #4
        kinda sucks.. so u must put the "http" part.. eh
        _________________
        I am the best

        Comment

        • Brad Gosse
          Confirmed User
          • Jan 2002
          • 2616

          #5
          the only way would be to use an htaccess redirect but the http:// would need to be in htaccess
          Free Clipart

          Comment

          • grumpy
            Too lazy to set a custom title
            • Jan 2002
            • 9870

            #6
            why would you wanna do that?
            Don't let greediness blur your vision | You gotta let some shit slide
            icq - 441-456-888

            Comment

            • HomerSimpson
              Too lazy to set a custom title
              • Sep 2005
              • 13826

              #7
              Originally posted by grumpy
              why would you wanna do that?
              yeah?
              what's the deal about it?
              what are you trying to achieve?
              Make a bank with Chaturbate - the best selling webcam program
              Ads that can't be block with AdBlockers !!! /// Best paying popup program (Bitcoin payouts) !!!

              PHP, MySql, Smarty, CodeIgniter, Laravel, WordPress, NATS... fixing stuff, server migrations & optimizations... My ICQ: 27429884 | Email:

              Comment

              • calmlikeabomb
                Confirmed User
                • May 2004
                • 1323

                #8
                Yes, but it involves intercepting the click event with JavaScript.

                Essentially, you need http://, but it's possible without altering the markup that you provided above. All of your links could look like what you described.

                Only a few lines of code assuming you're a JavaScript ninja armed with jQuery.
                Last edited by calmlikeabomb; 10-09-2008, 02:16 PM.
                subarus.

                Comment

                • seeandsee
                  Check SIG!
                  • Mar 2006
                  • 50945

                  #9
                  i hate that shit too, few times i make such links in html source and then i get www . mysite . com / www . thaturlfucking . com . html
                  BUY MY SIG - 50$/Year

                  Contact here

                  Comment

                  • calmlikeabomb
                    Confirmed User
                    • May 2004
                    • 1323

                    #10
                    so why do you wanna do this..?

                    http://calmdev.com/gfy/click.php

                    i wouldn't suggest using js for the task, but it's possible...

                    Code:
                    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
                    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
                    <head>
                        <title>Intercept Click</title>
                        <script type="text/javascript" src="http://assets.fit.edu/src/js/jquery/jquery.js"></script>
                        <script type="text/javascript">
                        $(document).ready(function(){
                            $('a').click(function() {
                                document.location = 'http://' + $(this).attr('href');
                                return false; 
                            });
                        });
                        </script>
                    </head>
                    <body>
                        <a href="www.google.com">Google</a>
                    </body>
                    </html>
                    subarus.

                    Comment

                    Working...