Script

Filter
2001-06-06

Framebuster

Javascript
Framebuster som kan användas för att undvika att ett frameset visar din sida i en ram
if (window != top) top.location.href = location.href;

// variant åt andra hållet...
if (window == top) top.location.href = 'frameset.htm';
2001-05-30

Länk-knapp

Javascript
Gå till en ny sida via en knapp
<form>
<input type="button" value="Gå till nysida" onClick="location.href='nysida.htm';">
</form>
2001-05-30

Fönsterattribut

Javascript
attribut som kan användas vid öppnandet av ett nytt fönster
window.open() Method Attributes Controllable via Script

Attribute    Value       Description
toolbar      Boolean     "Back", "Forward" and other buttons in the row
location     Boolean     Field displaying the current URL
directories  Boolean     "What’s New" and other buttons in the row
status       Boolean     Statusbar at bottom of window
menubar      Boolean     Menubar at top of window
scrollbars   Boolean     Displays scrollbars if document is larger than window
resizable    Boolean     Interface elements that allow resizing by dragging
copyhistory  Boolean     Duplicates Go menu history for new window
width        pixelCount  Window outer width in pixels
height       pixelCount  Window outer height in pixels
2001-05-29

Generell tabellutskrift

Asp
Skriver ut en hel tabell oavsett hur många fält eller poster
response.write("<tr>")
for i = 0 to rs.fields.count - 1
    response.write("<th>" & rs(i).name & "</th>")
next
response.write("</tr>")
do while not rs.eof
    response.write("<tr>")
    for i = 0 to rs.fields.count - 1
        response.write("<td>" & rs(i) & "&nbsp;</td>")
    next
    response.write("</tr>")
    rs.movenext
loop
2001-05-29

Hemligheter i CSS

Css
Pseudoklasser. Länkar som ändrar färg vid rollover.
a:link { text-decoration:none; color:#069499 }
a:visited { text-decoration:none; color:#90a284 }
a:hover { text-decoration:none; color:#bb925f }
a:active { text-decoration:none; color:#ff0000 }

input:hover { text-decoration:none; color:#bb925f } // endast Mozilla
input:focus { text-decoration:none; color:#bb925f }

//klasser: knapp och textruta:
input.knapp:hover { text-decoration:none; color:#bb925f }
input.textruta:focus { text-decoration:none; color:#bb925f }
🙂