Hello,
I am trying to make a vertical progress bar, which works fine on almost all browsers except IE7. I don't know what's going on..
link text
I've tried almost everything, and I can't figure out what's wrong...
Hi there, I have recently ran into this strange issue, I was trying to reference parent window in an iframe, but somehow window.parent or parent are always undefined.
I got around the problem by using window.top, but this question still haunts me.
Why is window.parent undefined?
This is a .NET web app, if it helps.
Update: I would like to add that both parent and child iframes are pointed to the same domain (localhost). As for code, I have tried the following code:
if (parent != null)
{
// do something
}
where do something never happens, I also tried
alert(parent)
and
alert(window.parent)
they always come out as null.
I need to know the referring server for a page on my site.
Is there any safe method to check where the user "came" to the page FROM?
I tried uploading this to my server, but this wont output anything at all when I write the adress to the file in the browsers adress bar:
<?php echo $_SERVER['HTTP_REFERER']; ?>
I need to check this in order to display a link on the page or not...
Thanks
I just started using google app engine. In order to use templates, I'm using jinja2.
I want to add images dynamically after I set the width and height of the img tag. I used
PIL in order to read the image size and put the one I want.
However when I open the image with PIL, I need it not to be in a static_dir
and to put the image in the img tag, I need it to be in the static_dir.
As a testing solution I've copied the folder to see if I get results and I did. But as
you can see having each image saved twice is kind of bad.
Hello guys, i want to put an IRC client in my webpage, i know there are many clients but not opensource (i dont found any). So, do you know some free and open source proyects to implement an irc client on a webpage? and what do you suggests in term of the plataform, i mean, its a good idea to have one made on flash?, one made in html5?, one made on javascript/php?. Thanks for yours answers.
Hello all,
I have an ordered list (ol) on my page but the numbering is not showing up at all! I have done this:
<ol>
<li>my text</li>
<li>my text</li>
<li>my text</li>
</ol>
As I have typed the above, stackoverflow was able to render it correctly the way I wanted it to, like so:
my text
my text
my text
However, this is not happening on my webpage. I am viewing this in Firefox on my localhost.
If any knows why my ol's look like ul's (i.e. no numbering) I would be grateful for help. If not, please let me know how I can achieve a numbered list using ul's.
Thanks all
I want to display a table from database in phpMyAdmin by putting the following conditions that in every different options in drop down menu it displays different table from database by pressing the button of search. But it is not doing so.
<p class="h2">Quick Search</p>
<div class="sb2_opts">
<p></p>
<form method="post" action="" >
<p>Enter your source and destination.</p>
<p>From:</p>
<select name="from">
<option value="Islamabad">Islamabad</option>
<option value="Lahore">Lahore</option>
<option value="murree">Murree</option>
<option value="Muzaffarabad">Muzaffarabad</option>
</select>
<p>To:</p>
<select name="To">
<option value="Islamabad">Islamabad</option>
<option value="Lahore">Lahore</option>
<option value="murree">Murree</option>
<option value="Muzaffarabad">Muzaffarabad</option>
</select>
<input type="submit" value="search" />
</form>
</form>
</table>
<?php
$con=mysqli_connect("localhost","root","","test");
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
if(isset($_POST['from']) and isset($_POST['To'])) {
$from = $_POST['from'] ;
$to = $_POST['To'] ;
$table = array($from, $to);
switch ($table) {
case array ("Islamabad", "Lahore") :
$result = mysqli_query($con,"SELECT * FROM flights");
echo "</flights>"; //table name is flights
break;
case array ("Islamabad", "Murree") :
$result = mysqli_query($con,"SELECT * FROM isb to murree");
echo "</isb to murree>"; //table name isb to murree
;
break;
case array ("Islamabad", "Muzaffarabad") :
$result = mysqli_query($con,"SELECT * FROM isb to muzz");
echo "</isb to muzz>";
break;
//.....
//......
default:
echo "Your choice is nor valid !!";
}
}
mysqli_close($con);
?>
I'd try to explain what I mean, but there is an easier way: click here for jsfiddle example.
Basically I want the border color of the div rfrsh_btn to change when productOptionsMenu is hovered over.
I'm using jQuery with the .noConflict var because this site also uses Prototype.
jQuery:
var $j = jQuery.noConflict();
$j(".productOptionsMenu").hover(
function () {
$j(#rfrsh_btn).css({"border-color":"#85c222"});
};
);
Thanks :)
<div id="div">
<div> <!-- first level -->
<div> <!-- second level -->
<div>1.1</div> <!-- third level -->
<div>1.2</div>
</div>
<div>
<div></div>
<div>2.2</div>
</div>
</div>
</div>
What are the jQuery selector expressions for selecting the followings:
1. div commented by first level
2. divs commented by second level
3. divs commented by third level
I have a list of phone extensions that I want to print a friendly version of it.
I have a print css for it to print appropriately onto paper, the extensions are located within an unordered list, which are floated to the left.
<ul>
<li>Larry Hughes <span class="ext">8291</span></li>
<li>Chuck Davis <span class="ext">3141</span></li>
<li>Kevin Skillis <span class="ext">5115</span></li>
</ul>
I float it left, and when it prints the second page, it leaves off the name part of the list (in Firefox, works fine in Google Chrome and IE), see here: http://cl.ly/de965aea63f66c13ba32
I am referring to this: http://www.alistapart.com/articles/goingtoprint/ - they mentioned something about applying a float:none; to the content part of the page. If I do that, how should I go about making the list show up in 4 columns? It is a dynamic list, pulled from a database.
Any help is appreciated.
I need something like a cookie, but I specifically don't want it going back to the server. I call it a "client side session cookie" but any reasonable mechanism would be great.
Basically, I want to store some data encrypted on the server, and have the user type a password into the browser. The browser decrypts the data with the password (or creates and encrypts the data with the password) and the server stores only encrypted data. To keep the data secure on the server, the server should not store and should never receive the password. Ideally there should be a cookie session expiration to clean up.
Of course I need it be available on multiple pages as the user walks through the web site.
The best I can come up with is some sort of iframe mechanism to store the data in javascript variables, but that is ugly. Does anyone have any ideas how to implement something like this?
FWIW, the platform is ASP.NET, but I don't suppose that matters. It needs to support a broad range of browsers, including mobile.
In response to one answer below, let me clarify. My question is not how to achieve the crypto, that isn't a problem. The question is where to store the password so that it is persistent from page to page, but not beyond a session, and in such a way that the server doesn't see it.
Hello,
I was wondering what would be the best way to implement some kind of "drag n drop" user interface?
What i mean is that there would be one main page and every link click (eg. other sections like about, gallery, contact form) would open a new drag n drop element on top of that main page. Something like windows desktop where you can move your application windows around the screen.
Would it be best to call different functions with AJAX when a link is clicked? Like "gallery" link would call gallery-function and retrieve dynamically generated contents of that "window" with AJAX call and then just load that stuff on some div?
Or would some other type of approach suit better for this?
I hope I was able to explain this clearly enough. I'm looking for a proper "design pattern" to implement this. All suggestions are wellcome! :)
I'm using pointer-events:none; on the main photograph at the top of my site http://www.onedirection.net/, to allow the user to select the navigation behind the image.
However, I'd like to let the user click on each member of the band to go to a separate page, but ONLY for the parts of the image that don't overlap into the navigation.
I'm a bit stuck with this. Can it be done? I was thinking of using an image map, but can't get it working without the navigation becoming "less clickable".
I have a image where text/link is overlayed on top. My problem is that sometimes the text in the foreground will hide the link in the image in the background. I assume this is because the text box forms an invisible rectangle around the text, thus creating a region that appears it should belong to the image but is actually being covered by the text. I am wondering if it is possible that when I mouse over this region, I will be linking to my image link as oppose to my text link (see illustration).
http://jsfiddle.net/WHpMr/
I know that may sound silly, but I'm trying to submit a form on a page inside an iFrame, from the parent site.
Here's an example of the form:
<form action="/add_email" method="post">
<div class="field">
<label for="newEmailAddress" style="width: auto">Add new email address</label>
<input type="text" id="newEmailAddress" name="email" value="null" class="text-field" />
<input type="hidden" name="__app_key" value="null"/>
<input type="submit" value="Add address and send activation email">
</div>
</form>
As you can see, the Submit button, and the form itself both lack a proper name or id, this is not something I have control over. (It's on an external website.)
Any suggestions?
I was trying to create a checked radiobutton by using following code in IE7. But it doesn't work.
var x = document.createElement("");
var spn=document.createElement("span");
spn.appendChild(x);
x.checked=true;
document.body.appendChild(spn);
I found that I could put x.checked=true after appendChild statement to make it work. I also noticed that when I change "radio" to "checkbox", it can be checked without changing the order of statements.
I am really confused by these facts. Am I doing something wrong in the above code?
All,
Can any 1 of you show a small piece of code for generating a thumbnail of any website using javascript or jquery,
I had posted earlier but couldnt find any right match for my requirements.
<div id="generate_thumbnail" onclick ="generate();">
//Show thumbnail within this div
</div>
<Script>
function generate()
{
// generate small thumbnail
}
Hi
Im working with email address which has an ampersand in it,
the user wants a 'contact us' link to open up a new message wit their address populated,
I normally use href, but the ampersand is causing this not to work,
any idea's?
here's what i have at the moment:
<a href="mailto:L&[email protected]? subject=MessageTitle&"
style="font-family: Verdana; font-size: large; font-weight: bold; color: #800000">#GHA Organisation Development</a>
Is it possible to have 3-4 CSS on a page, and then on any event, say click, change the css for entire webpage. This way we can give our user the ability to change the theme. I know we can change the css of an element by:
$("#myElementID").removeClass("class1").addClass("class2");
After asking a couple of questions I managed to create this form. I didn't have troubles making it return false if the submitted value was 0 but I cannot make it return false when it's the string 'Cambia de ciudad". I'm sure I'm messing with the quotes or something like that. This is the form:
<form role="search" method="get" action="http://chusmix.com/" onsubmit="if (document.getElementById('s')== 'Cambiá de ciudad") return false;'>
<input class="ubicacion" name="s" id="s" tabindex="1" onsubmit="if ((document.getElementById('s').value.length < 4) || (document.getElementById('s')== 'Cambiá de ciudad')) return false;" onfocus="if (this.value=='Cambiá de ciudad') this.value = ''" onblur="if(this.value == '') this.value = 'Cambiá de ciudad'" type="text" maxlength="80" size="28" value="Cambiá de ciudad">
<input type="submit" id="searchsubmit" value="Buscar" />
</form>
How do I make it work? Thanks
I've noticed a small alignment issue in the three major browsers when rendering my web site. As such how can I perform the following pseudo-code with pure CSS?
if Webkit (Safari/Chrome) {
#myDIV {margin-top:-3px}
} else if (Firefox) {
#myDIV {margin-top:0px}
} else { // IE and other browsers
#myDIV {margin-top:1px}
}
I have 2 divs with 3 divs inside them, all 2 wrapped around one big div. I try and center it and its not working. Here is my code:
<div stye="margin-left:auto; margin-right:auto; width: 1210px;">
<div id="left" style=" float:left; width: 606px; height: 506px;">
<div style="top:0px; float:left; width:300px; border: 2px solid #FF0; height:502px; text-align:center; font-family: Myriad Pro, Arial, sans-serif; color:#FFF;"><h1>A picture of a cool guy wearing our shirt will go in here.</h1></div>
<div style="top:0px; float:left; width:300px; border: 2px solid #FF0; border-left:0px; height:200px; text-align:center; font-family: Myriad Pro, Arial, sans-serif; color:#FFF;"><h1>A product image will go in here.</h1></div>
<div style="top:0px; float:left; width:300px; border: 2px solid #FF0;border-top:0px; border-left:0px; height:300px; text-align:center; font-family: Myriad Pro, Arial, sans-serif; color:#FFF;"><h1>A tight product image will go in here.</h1></div>
</div>
<div id="left" style="float:left; width: 604px; height: 506px;">
<div style="top:0px; float:right; width:300px; border: 2px solid #FF0; border-left:0px; height:502px; text-align:center; font-family: Myriad Pro, Arial, sans-serif; color:#FFF;"><h1>A picture of a cool guy wearing our shirt will go in here.</h1></div>
<div style="top:0px; float:left; width:300px; border: 2px solid #FF0; border-left:0px; height:200px; text-align:center; font-family: Myriad Pro, Arial, sans-serif; color:#FFF;"><h1>A product image will go in here.</h1></div>
<div style="top:0px; float:left; width:300px; border: 2px solid #FF0;border-top:0px; border-left:0px; height:300px; text-align:center; font-family: Myriad Pro, Arial, sans-serif; color:#FFF;"><h1>A tight product image will go in here.</h1></div>
</div>
</div>
I added 1 pixel border to the image. At the same time I am trying to give radius to the image edges.
My problem is since the image is already rounded with photoshop, the border of edges look thinner than it should be
You can check it from here.
http://jsfiddle.net/fVNgA/
How can I make the border even?
img{ -webkit-border-radius: 5px; -moz-border-radius: 5px; border: 1px solid #000; }
<img src='http://carantina.com/wp/wp-content/themes/new/images/home_pic1.jpg'>
I would like to use a switch for the layout of paragraph tags on a webpage.
I use the after pseudoelement
p:after {content: url("../img/paragraph.gif");}
Now i need to remove this css code from the page. How can this be done easily (jquery is already used on the page)? (i do not want to include or remove files containing css)
Hi,
I have style applied to the TD elements of the dataTable of my myfaces application.
td.financialReportTd {
font-family: Arial;
font-size: 12px;
line-height: 12px;
color:black;
background-color: white;
padding-right: 5px;
text-align: right;
border:0px black solid;
height: 30px;
padding-top:4px;
padding-left:4px;
vertical-align: top;
direction: rtl;
}
Output:
<td class="financialReportTd">
MY TEXT
</td>
No matter what I try, those NBSP tags fill up the TD and position of the text changes to the worse.
I tried style text-align:right; (I need RTL text), I tried direction: rtl; Nothing helps.
How can I align my text to the very right of the TD and avoid those space tags?