Results 1 to 6 of 6

Thread: What kind of code is this???

  1. #1
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default What kind of code is this???


    Hey, I was pilfering through the code of a site that I like to try to get inspiration from... and I guess you could call me stupid... But I can't figure out what kind of code this is...

    Code:
    <a href="?cssfile=/195/195.css&amp;page=0" title="AccessKey: a" accesskey="a">Dazzling Beauty</a>
    I like the idea behind the function... It loads a different stylesheet into the current page... but I can't figure out what kind of code it is or how to implement something similar myself... Any help would be greatly appreciated.
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    It's HTML, and if you look in the <head> section you will most likely see reference to X different CSS files. Where X is the number of links like that one.

    This is just a guess though. If you could supply the link to the page we could tell you more.

    Try this link though if I am correct: http://www.dynamicdrive.com/dynamici...etswitcher.htm
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It's a link to a server-side script. cssfile and page are two GET variables being passed to it.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    Quote Originally Posted by Twey View Post
    It's a link to a server-side script. cssfile and page are two GET variables being passed to it.
    Ok, so Here's the link to the page I'm talking about... So do you know how I might be able to implement something like that into my page? Preferably without using javascript... that's what threw me about that code... It didin't look like javascript. I was thinking it was PHP maybe???
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It's simply a link. Nothing special. The link points to a server-side script (possibly PHP) which generates a link to a CSS file based on the parameter passed to it.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Basically, that links just to the current page.
    It sends the certain cssfile to it, so that it will use that cssfile, and the "page", so that it will generate that "page".

    PHP or another serverside script takes those values and does stuff, such as inserting that css and outputting that page.

    It's easy enough to send the values, but if you want to looking into coding like that, you'll need to learn about php.
    I really like PHP, and it's not that complex, but certainly a bit more so than html.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

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