I noticed that PHP seems to return only values of checked checkboxes. I would like to see a list of checkboxes, not just values of checked checkboxes. Is there a way to detect variables of unchecked boxes?
I asked because I want to be able to update settings. For example, I have a few options that are already checked but if an user decides to uncheck an option, I need to know that unchecked value so I can update the option to be disabled.
I've read all over the Internet that I should not define fonts (or anything) with absolute pixel height/width/size and instead, use EM ... so that on higher resolution displays, my web site can scale appropriately.
However, what do I use to define IMAGE height/width ... because images won't scale well (they look pixelated)
I've read all over the Internet that I should not define fonts (or anything) with absolute pixel height/width/size and instead, use EM ... so that on higher resolution displays, my web site can scale appropriately.
However, what do I use to define IMAGE height/width ... because images won't scale well (they look pixelated)
UPDATE:
To clarify, I'm not referring to page zoom. I'm referring to how to make my web application resolution independent so that it will look correct on higher DPI displays.
I want to do the following:
aa: ________
bbbb: ________
ccc: ________
So I wrote:
<span>aa:</span><input type="text" /><br/>
<span>bbbb:</span><input type="text" /><br/>
<span>cc:</span><input type="text" />
And I get:
aa:________
bbbb:________
ccc:________
I know I can arrange it easy with table. How do I do it without tables with as few css as I can.
Thanks.
Hi, I am new to WPF. We are facing one issue. We are showing/launching a WPF browser application from an web (ASPX) application. The web application has a navigator menu with drop-downs (on hover). It works fine till the user is using the web application (aspx pages). But once the WPF application is launched (and is in the foreground on the aspx page) the dropdown menus that are on top of the WPF app is shown below the WPF application. The drop downs are in a <div> and we tried to put the ZINDEX value. But could not get any positive reply. Can somebody help?
I just made this demo extracting out what I'm trying to accomplish:
Autosize Main Content Area
I want the pink/yellow area to act according to these rules:
Minimum height is the size of its content (which is variable) IF content size is smaller than viewport size
Otherwise minimum height is such that it adjusts to fill the window.
Checking out the source to that demo, what am I missing? I feel like this is a pretty easy case that shouldn't require javascript.
Any ideas?
I'm new to Devise and have it working fine by using an email address as the authentication key. However, I have a use case which requires a username instead and I can't seem to get it working.
I've added a string column, "username" to the users table, changed the fields from :email to :username in the sign-in form, and have changed the authentication key in devise.rb to :username yet when I go to sign in I'm met with this prompt: "Please enter an email address".
What am I doing wrong?
**new.html.erb**
<div><%= f.label :username %><br />
<%= f.email_field :username %></div>
**User.rb**
class User < ActiveRecord::Base
# Include default devise modules. Others available are:
# :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable, :authentication_keys => [:username]
# Setup accessible (or protected) attributes for your model
attr_accessible :email, :password, :password_confirmation, :remember_me, :username
# attr_accessible :title, :body
end
**devise.rb**
config.authentication_keys = [ :username ]
There is a simple way with php, a simple script or URL manipulation to build a URL for the gravatar image corresponding to an email?
Ex. http://gravatar.com/avatars/[email protected] and this return a jpeg or png image.
If there is no simple way like the example, what is the easiest way you know to resolve a url of the gravatar corresponding to an email?. Thanks
I'm displaying 3 <img> in a row like this:
<div style="width: 950px">
<img src='/UploadedImages/86.jpg' alt='' style="width: 300px; margin: 0px; padding: 0px; border: 1px solid Black" />
<img src='/UploadedImages/85.jpg' alt='' style="width: 300px; margin: 0px; padding: 0px; border: 1px solid Black" />
<img src='/UploadedImages/84.gif' alt='' style="width: 300px; margin: 0px; padding: 0px; border: 1px solid Black" />
</div>
As you can see I have thin black borders around the images. My problem is that there are white spaces about 5px wide between the borders of neighbouring images and I have set the margin to be 0px but it does not work. So what is happening here?
I have a Rails app handling authentication with the restful_authentication plugin.
I'm experiencing problems with the email activation feature and before I deal with that I would like to just allow my users to register without having to go through the email activation process.
How do I disable the email activation feature.
Rails 2.2.3
Restful_authentication
In print mode, I would like to render such a links:
<a href="#targetPage">link</a>
like this:
<a href="#targetPage">link (page 11)</a>
(suppose the target page is on 11. page in print preview).
It is possible to add page number using counters to the page footer with plain CSS, but could I use this in more "the way I want it" way?
The solution doesn't need to be cross-browser (FF/Chrome is enough), any CSS/Javascript tricks are allowed...
As any seasoned JavaScript developer knows, there are many (too many) ways to do the same thing. For example, say you have a text field as follows:
<form name="myForm">
<input type="text" name="foo" id="foo" />
There are many way to access this in JavaScript:
[1] document.forms[0].elements[0];
[2] document.myForm.foo;
[3] document.getElementById('foo');
[4] document.getElementById('myForm').foo;
... and so on ...
Methods [1] and [3] are well documented in the Mozilla Gecko documentation, but neither are ideal. [1] is just too general to be useful and [3] requires both an id and a name (assuming you will be posting the data to a server side language). Ideally, it would be best to have only an id attribute or a name attribute (having both is somewhat redundant, especially if the id isn't necessary for any css, and increases the likelihood of typos, etc).
[2] seems to be the most intuitive and it seems to be widely used, but I haven't seen it referenced in the Gecko documentation and I'm worried about both forwards compatibility and cross browser compatiblity (and of course I want to be as standards compliant as possible).
So what's best practice here? Can anyone point to something in the DOM documentation or W3C specification that could resolve this?
Note I am specifically interested in a non-library solution (jQuery/Prototype).
So I've got this code that has an image and when you click it a dropdown menu appears. Pretty simple. The code works fine but I'm trying to incorporate an image swap on click and I'm having difficulty. Here's the HTML and the JS (there's some CSS too, but I'll leave that out):
HTML:
<div id="header">
<dl class="dropdown">
<dt><a href="#"><img src="images/cogwheel_btn.png"/></a></dt>
<dd>
<ul>
<li><a href="#">Favorites</a></li>
<li><a href="#">History</a></li>
</ul>
</dd>
</dl>
</div>
JS:
$(document).ready(function() {
$(".dropdown img.flag").addClass("flagvisibility");
$(".dropdown dt a").click(function() {
$(".dropdown dd ul").toggle();
});
$(".dropdown dd ul li a").click(function() {
var text = $(this).html();
$(".dropdown dt a span").html(text);
$(".dropdown dd ul").hide();
$("#result").html("Selected value is: " + getSelectedValue("sample"));
});
function getSelectedValue(id) {
return $("#" + id).find("dt a span.value").html();
}
$(document).bind('click', function(e) {
var $clicked = $(e.target);
if (!$clicked.parents().hasClass("dropdown")) $(".dropdown dd ul").hide();
});
$("#flagSwitcher").click(function() {
$(".dropdown img.flag").toggleClass("flagvisibility");
});
});?
I've tried adding lines like ("dt").empty(); and then ("dt").html("new_image") but it causes the dropdown functionality to stop working. Anyone any ideas?
I find it very convenient to set arbitary attributes like:
<a stackoverflowId="123">..
And in JavaScript:
var soId = $selectofA.attr('stackoverflowId'); //jQuery
Is it a good practice at all? I've never had a problem with this yet.
Is it possible to set a base url on a page with a relative value?
For example, I have two websites (website A and website B). For Website B it will be located at www.website-a.com/website-b. So could I set the BASE href as '/website-b/'?
Thanks
I have C# web application that I want it to send out an email on a certain date, such as if equipment isn't returned on the day it was due. Data is in MS SQL database.
I've got all the email code already done, and I'm just curious how do I trigger this email, say after the COB on that particular day?
Thanks,
Eric
I've got a bit of XML I want to display on my ASP.NET website as-is (for debugging purposes), and it would be nice if it was colored. This should be easy to achieve with the right kind of XmlWriter, but I don't have the time to make one myself. Is there an existing (free) component that can do this?
How would I do to check if a email actially exists?
Cant understand how sites do to send mails with a unique link that the users clicks to validate that he is the owner of email =/
Make a 2 new columns called activationkey and activated and store some random string, send an email with the activationkey, and update the users activated =1 that match that activation link
register.php?a=activate&key=9cdfb439c7876e703e307864c9167a15
Any better ideas?
Hi All,
I am developing a web-app where I want to provide a download link to users - so they can download a zip file from my server.
Now, my requirement is that I want to execute some processing logic contained in a servlet before displaying the file dialog to the user for 'zip' files.
So If I write
<a href="abc.zip".......>
then it opens a file dialog asking the user to select the location where this file can be saved
But if I want a servlet's doGet method to do some preprocessing - say like building the zip file , then how can I first call the servlet and then open the file dialog.
Will the following snippet work?
<a href="MyHandlerServlet;abc.zip".......>
Thanks for your help !!
I need to extract information from an unstructured web page in Android. The information I want is embedded in a table that doesn't have an id.
<table>
<tr><td>Description</td><td></td><td>I want this field next to the description cell</td></tr>
</table>
Should I use
Pattern Matching?
Use BufferedReader to extract the information?
Or are there faster way to get that information?
I have a bunch of images that are guaranteed to have:
minimum width = 200px
maximum width = 250px
minimum height = 150px
maximum height = 175px
What I want to do is display a consist 200px by 150px rectangle of the image while maintaining scale (no stretching or shrinking).
Which means, I might have some overflow.
How can I display the image so that it keeps porpotions to the original image size, yet displayed inside a 200x150 px window and hiding any overflow?
I want to pick up the values in a Div tag like which is some what like this
<html>
<head> </head>
<body>
<div id="page">
<html>
<head></head>
<body> Hellow World </body>
</html>
</div>
</body>
</html>
I want to select the content inside a div tag .
var msg = $("#page").html();
alert(msg);
this code is not working . i want that whole 2nd page along with the HTML tag is copied. How do i do that ?
I want the output to be the WHOLE thing INCLUDING the HTML tags