html

Javascript: Get selected radio and paste it on a label tag with jQuery

I have a gender selection radio: <div class="label-inputs" name="userFieldDiv" id="genderUserFieldDiv"> <label class="required">Sexo</label> <input type="radio" class="check" value="F" name="userDto.gender" id="userDto.gender0"> <label for="userDto.gender0">Femenino</label> <input type="radio" class...

Preventing HTML character entities in locale files from getting munged by Rails3 xss protection

We're building an app, our first using Rails 3, and we're having to build I18n in from the outset. Being perfectionists, we want real typography to be used in our views: dashes, curled quotes, ellipses et al. This means in our locales/xx.yml files we have two choices: Use real UTF-8 characters inline. Should work, but hard to type, a...

Javascript: get a value with jQuery and replace it.

I have a gender selector, and a script that gets the value of the selected gender and pastes it on a label, but its pasting the value: "M" or "F". <div name="userLabelDiv" id="genderUserLabelDiv"> <label class="required">Sexo</label> <label id="genderLabel">F</label> </div> Now when Im trying to get this letter and replac...

the HTML script tag and non-JS content - Firefox

It appears this code will request the file in Chrome and IE but not in Firefox. <script type="text/my-custom-mime-type" src="test.ashx"> </script> Is there a some spec that says browsers should only process JavaScript related mime-types? I know IE probably supports this because of the history with vbscript. Once you have "content" li...

How my select list become uneditable?

Hi everybody, I am coding some sort of booking system - calendar. One of the features is also a (js) pop up window with detailed information about event - user can either view them or edit. Now my problem - I have put there a HTML select control (dropdown box), quite simple - 5 options. But somehow, and I have no ide why, this select i...

How to stay in the same location after an alert?

I have an alert box in javascript which is prompted by clicking a link down the page. When the alert box pops up, and the user presses ok, the user is redirected to the top of the page. How do i make it so the page stays where the user prompted the alert box? Thanks!! ...

How can I get my <p> elements to be vertically centered along side <input> and <textarea> fields?

I can't get the p, input and textarea elements all be centered with in a li elements in a user settings area I am working on right now. Right now only the input and textarea elements are being properly centered with in the li elements while the p elements are positioned right at the top. I have tried to apply vertical-align: middle t...

GEOWEBCACHE pass time parameter into string request.

I'm using geowebcache to return the data to OpenLayers, now I need to pass the time variable in the http request and i don't know how, so when i make the request with the time that can vary the same is sent with the request to the geowebserver and passed to the service if no cached... ...

Pass the value of a SELECT to a Javascript function via the onchange event?

I have a HTML page that contains a search box containing a number of textboxes. The first part of the search box is a SELECT dropdown list that contains a variety of report types. Each report type requires 1 or more of textboxes to be filled in to filter the query results. My goal is hide the textboxes that are not required by the cur...

PHP Variable Issue

For starters, I am completely new to PHP. That being said, here's my problem. I've got a web page index.php that includes a header.php and footer.php. At the top of my index.php page I have: <?php $pageID = 'home'; ?> In the header.php file I have <body id="<?php echo $pageID; ?>"> Yet when the page loads, the body tag simply lo...

Get Element By using Class name

Hi Guys I want Element by using class name Now I am using GWT 2.0 Please help me Thanks ...

Google Maps API Marker Images not showing in Internet Explorer

Hi, I'm using Google Maps API Javascript V3 and I have a problem where in Internet explorer, my marker images aren't appearing but according to Adobe Browserlab, other browsers have no problem. The coordinates are being read from a div called "hidden". Here is my code: <script type="text/javascript"> function initialize() { var cent =...

I can't seem to get mod_proxy_html working at all - no debug output, no errors.

I'm running apache 2.0.52, and I've compiled the mod_proxy_html module (version 3.1), apache starts fine, no errors. The only problem is that the module appears to do nothing - I'm not even getting any debugging output in the error log, so I'm a little stumped, as I fdon't even have any logging to point at a clue why it isn't working. Th...

Accessing multiple values from generated panel

I have some logic that loops and adds a new Panel control to another control: for (int segmentIndex = 0; segmentIndex < segments.Length; ++segmentIndex) { holder.Controls.Add(new Panel() { Width = Unit.Percentage(segments[segmentIndex] / segmentsSum * 100), CssClass = String.Format("segment segment-{0}", segmentIndex) }); } containe...

jQuery UI accordion that keeps multiple sections open?

I may be an idiot, but how do you keep multiple sections in jQuery UI's accordion open? The demos all have only one open at a time... I'm looking for a collapseable menu type system. ...

Which is quicker; Comparing text against an array, or an external file?

I have to implement a "bad words" filter on my website, which is a classifieds website. I have a big list of "bad words" but don't know which method is best to compare the user inputs to. In my case, a textarea inside a form, needs to be checked for "bad words". <form name="test" action="test.php" method="post"> Inside test.php I...

What could be making jQuery's toggle fire twice on the second click?

I have a FireWorks-generated HTML page and I added some jQuery to it for desired effects...it's for a pain study, so when you click a part of the spine, it lights up in red. I added jQuery's toggle for sort of an "unclick" option, but it's not working as expected. (Similar to a previous question I asked, but different enough IMO). When...

div element in table cell has some kind of spacing

Ok, I know that using tables for layout is bad. But we have a client that has ie6 installed on all workstations and we have to make a complicated layout that works perfectly on it so the clean CSS solution didn't work so I had to do it with tables. Here's the HTML code that I have : <body> <table id="main_table"> <tr> <td> ...

Is it possible to get the HTML code from WebView

I would like to preemptively get the HTML code of a webpage that is to be loaded in a webView, parse it using regex, and display only the HTML code that I want, while letting the webpage still think it has loaded everything. Is there any way to do that in the WebViewClient.onLoadResource() or similar methods? EDIT: I tried this: clas...

Javascript makes browser load forever and crash Safari.

Hi I'm trying to make a little script that'll inject a tag in a page. Here it is: <script type="text/javascript" charset="utf-8"> var url = 'http://my_url.com/js/widget_rss.js?cle=4c65683101e22&amp;host=' + window.location.hostname; var scriptTag = document.createElement('script') scriptTag.src = url; var head = d...