html

Best way to use checkboxes with PHP

Hi all, first off I am a rookie so please forgive my basic question. I am trying to use an html checkbox to let me know when to check a serial number. The problem is no matter what i do I get an error telling me "Notice: Undefined index: sncheck in XYZ". I tried using a ternary operator to set the value as it was posted (If the checkbox...

HTML margin push other elements

Hi, could someone answer me, WHY when I set a margin-top to my <div id="logo">, all the others divs are pushed down. And why if a set float:left to my <div id="logo">, everything works fine. Code: <!DOCTYPE html> <html lang="pt-br"> <head> <title>Olá Mundo!</title> <style> /* CSS RESET HERE */ ( http://html5doctor.com/h...

Javascript: Highlighting part of a string with <b> tags

I'm trying to highlight a match in a string by inserting <b> tags around the matching substring. For example, if the query is "cat" then: "I have a cat." should become: "I have a <b>cat</b>." Likewise, if the query is "stack overflow", then: "Stack Overflow is great." should become: "<b>Stack Overflow</b> is great." In other...

How can I access the contents of a frame or iframe with JavaScript or JQuery?

I'm trying $(document).ready(function(){ var myIFrame = document.getElementById("myIframe"); var content = myIFrame.contentWindow.document.body.innerHTML; alert( content ); }) but I get an access denied error I guess because what I have loaded in the frame is Google. Is what I want to do even possible? T...

html type = file

With a html type=file, how can I tell if file was uploaded. Is there something in the $_POST values to indicate so? <form action="program" enctype="multipart/form-data" method="post"> <input type="text" name="textline" size="30"> <input type="file" name="datafile"> <input type="submit" value="Send"> </form> ...

html frames css

I wonder if there's some way to specify that a page in a frame is to use the style sheet of the parent? Or to specify a style sheet for the frame? Some option on the frameset or frame tag? ...

How can I have a list of lists, with the top-level li's being inline, and the lower-level lists being normal lists?

Hey so I have a list, with some of the items containing other lists. The first level of lists needs to be inline, but any list a level down should be normal list-item. It works better if I show you. This is what I have: However, I want Home Profile Groups Events and Frequencies to all be in one straight line, with any child lists below ...

Why does an element shifted with position: relative still contribute to parent dimensions as if it hadn't been moved?

Why does an html element (such as a div) that has been styled with position: relative; top: -50px; Still force the parent element to have the same size as if the relatively positioned element were not shifted? Let me provide an example (live example found at http://jsbin.com/ohebi4/2/edit) <html> <head> <style> article, asi...

use get and make page url

Hi, i have this form: <form action = "" method = "get"> <input type = "input" name = "id" value = "3" /> <input type = "input" name = "name" value = "gloris" /> <input type = "submit" class = "button_big" name = "submit" value = "SEND" /> </form> And how make this link (and i must use button): www.link.com/3/gloris ...

Pulling share thumbnail given URL from Facebook

Hello, I would like to pull the share site thumbnail from: http://www.facebook.com/share.php?u=my_website_url inside the tag <div class="UIThumbPager_Thumbs"> I would replace "my_website_url" with a given URL. Thank you! :) ...

Stopping Autocomplete from browers?

Possible Duplicate: How do you disable browser Autocomplete on web form field / input tag? I have implemented my own autocomplete via jQuery but the browser covers up the first option with its own autocomplete info? Is there a way to turn off this field's autocomplete from the server side? ...

html javascript type=file

With a html type=file, how can I validate to determine if a file was uploaded, (for client side validation using javascript or jquery) <form action="program" enctype="multipart/form-data" method="post"> <input type="text" name="textline" size="30"> <input type="file" name="datafile"> <input type="submit" value="Send"> </form> <script> ...

How does stackoverflow implement the Title box so that it hides the text when you type?

On the "Ask Question" page, the text in the Title box says "What's your programming question? be specific.". When you click on it, the text remains, but when you type anything it goes away. How is this implemented? I'm looking through the script and failing to find the code that hides this overlay text. ...

Is it valid to have a form tag inside a table tag?

Hey guys, I would like to know if is it valid to have a form tag inside a table tag? some documentation links would be appreciated. Thanks in advance. ...

Django Customizing Form Rendering

When rendering a django form using the as_p method, you traditionally get something like: <p>Subject: <input type="text" name="subject" maxlength="100" /></p> if you had defined the following field: subject = forms.CharField(max_length=100) Is there some additional property available to fields, that customizes how they are rendered...

How can I have floated list items display their bullet in IE7?

I've got a list with floated list items which should use the standard bullet. But in IE7 only, these bullets don't appear: Here is the all the code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" ...

jQTouch excute javascript code when going to next page

Hey, I have been working on an iPhone app that requires me to dynamically change the content. I have the following code: <div id="home"> <div class="toolbar"> <a class="blueButton" href="javascript: void(0);" onClick="$('#logout').show();">Logout</a> <h1>AllaccessMD</h1> </div> <h1>...

A likert scale in HTML

I am trying to find code for a likert scale in HTML. I have three questions. 1. I want it so say Not Guilty on the left and Very Guilty 2. I want it to say A lot of Damage on the left and No Damage on the Right 3. I want it to say Not Certain on the left and Very Certain on the Right. Does anyone know how to code this? ...

Indent, pretty-print code including Django template tags, HTML, CSS, and JavaScript

In dealing with a bunch of crufty Django template files, I want to indent them. The files contain: HTML, the bulk of the file. Maybe a pre tag or two. JavaScript, inside script tags. CSS inside the style tags Django template directives inside {% ... %} pairs. Surely there is a tool to do this. Most of the tools do silly things whe...

get an element's id

is there another way to get an element's ID? obj.getAttribute('id') ...