html

SoundManager / Jquery : Get SoundID sID

So I am trying to access a jquery soundmanager variable from one script (wpaudio.js – from the wp-audio plugin) inside of another (init.js – my own javascript). I am creating an alternate pause/play button higher up on the page and need to resume the current soundID, which is contained as part of a class name in the DOM. Here is the cod...

Referring to a specific place on page

I know that in Javascript document.location.href = "#my_id" tells the browser to display the same page starting from element with id="my_id". In this case, the address that appears in the address bar is in the following format: my_page_address#my_id Is this the only method to refer to a specific place on a page ? I'm looking for a metho...

Append some HTML into the HEAD tag?

Hi! I want to add some style to head tag in html page using javascript. var h = document.getElementsByTagName('head').item(0); h.innerHTML += '<style>a{font-size:100px;}</style>'; But when I run this code in IE8 I see this error message: Could not set the innerHTML property. Invalid target element for this operation. Any ideas? ...

Remove/add text based on user selection from drop drown w/ Jquery

I just need to add an asterisk to the end of some text based on a user's selection from a dropdown field. If the user select's option one from the drop down then the asterisk is attached and if the user selects the second option than the asterisk is removed. I think I need to do this with jquery but I am having trouble figuring out which...

How to parse malformed HTML in python, using standard libraries

There are so many html and xml libraries built into python, that it's hard to believe there's no support for real-world HTML parsing. I've found plenty of great third-party libraries for this task, but this question is about the python standard library. Requirements: Use only Python standard library components (any 2.x version) DOM s...

What is the best way to prevent a webpage coded completely in HTML (no PHP or any server side language) from caching?

I thought by placing these two lines that it would prevent the page from being cached but this is not the case between the head tags: <meta http-equiv="pragma" content="no-cache" /> <meta http-equiv="cache-control" content="no-cache" /> As already mentioned this is on server that doesn't support PHP (or any server side language, well,...

css menu list with nested lists

I'm trying to recreate this type (example 1, example 2) of menu list style, but I need it to be able to handle nested lists and I'm not sure how to do it. does anyone have any insight how I can do this? ie (w/ minimal markup) : <ul> <li>one</li> <li>two <ul> <li>two and half</li> </ul> </li> </ul> Thanks a bunch...

Loading page all content and scripts inside another

If you go to this page on our website: http://www.divethegap.com/scuba-diving-programmes-dive-the-gap/dahab-divemaster-training.html The buttons at the bottom that say 'Beginner' 'Open Water Diver' etc.... They take you to another page where you have a series of options and can book. We would like it so that rather than have to navigat...

Is GET Query String affected by content='text/html; charset=gb2312' html meta tag attribute ?

The Question is, In a regular HTTP Request to a server (non-ajax), Is the Query String passed by GET method to some server, get affected by the encoding specified by this : <meta http-equiv='Content-Type' content='text/html; charset=gb2312'> If the answer is no, How to define the encoding schema for the parameters of GET method ? e...

Multipart Form Problem in Ruby on Rails

I am developing a Ruby on Rails app that utilizes a Java Uploader. The uploader creates a multipart HTML form and submits it to my upload controller. For testing purposes, I have also created a simple multipart HTML form with a single input generated with file_field_tag. The HTML version behaves as expected, and generates the following...

Styling an If Else Statement

I know that it's not possible to style any given PHP but I do know that it is possible to style the output HTML that the PHP provides you with. I was wondering if there was any method available for me to use that would enable me to style the output from my IF ELSE statement. if ($result != false) { print "Your entry has successfully...

Javascript DOM failing when moving a CKEditor node

I need to be able to swap CKEditor rich text areas throughout my webpage. My current script works great when there's no CKEditor applied, but does not successfully move the text area (and entered text) when CKEditor is applied. Here's some code(it needs ckeditor to work): <html> <head> <title>Sample - CKEditor</title> <script ...

HTML+css dropdown centering

hello. I have this menu: #navbar { text-align: center; margin: auto; padding: 0; height: 1em; } #navbar li { list-style: none; float:left; } #navbar li a:hover{ background-color: #CCC; } #navbar li a { border: 1px solid #000; display: block; margin-right: 18px; margin-left: 18px; padding: 3p...

Clearing a form field when page goes back (html / javascript)

Do you know when you use in a form the password field, like this: <input type="password" name="pass"> And you do a GET or POST submit to the same page who have the form and if the user hit back in the browser the password field gets blank. Well thats good, but i need to get blank another form field when the user hit back. Thats because...

Clickable label not working in IE 8

I've got the following list item: <li> <input value="someRadioButton" name="ctl00$mainContent$group" type="radio" id="ctl00_mainContent_somelRadioButton" onclick="showSomeInfo()" /> <label for="ctl00_mainContent_someRadioButton"> <img class="extraPadding-Right-10" src="https://xxy.com/some_mark_37x23.gif" /> ...

How to make an HTML/JS WYSIWYG editor?

I've tried many different Google searches but I haven't been able to find a current tutorial (newer than 2006) on how to actually create a WYSIWYG editor. I realize there are many already, but I'm curious as to how they actually work. I've looked over some of the source code, but it's a lot to digest. I was wonderring if someone could de...

html source encode

when I view source on my php page I get &quot; for a quote. But instead, I would like " to be used in the source code. I have no control over manually replacing it so Im wondering if there is a function to do such a thing. ...

In order to bypass a website's login screen, can you load a link with a username and password?

I am relatively new to web development, and I was hoping I could get some pointers about the feasibility of a feature I would like to implement. Is it possible to have a url link that you can click on, that can contain login credentials for the website it is linking to, so as to bypass that websites login screen? In other words, can I m...

Simple/Direct/Heredoc way of constructing a HTML string in Java

In python I can construct a HTML string without worrying about escaping special characters like < or " by simply enclosing the string in triple quotes like: html_string = """ <html> <body> <p>My text with "quotes" and whatnot!<p> </body> </html> """ Is there a similar way to do this in Java? ...

How to retrieve an input's value without the browser interpreting html special entities?

Is there a way in JavaScript or MooTools to retrieve the actual text in the value from an input element without the browser interpreting any html special entites? Please see the example included below. My desired outcome is: <div id="output"> <p>Your text is: <b>[&lt;script&gt;alert('scrubbed');&lt;/script&gt;]</b></p> </div> Not...