I need to make a set of links open in a new window - the good thing is they all have the same css style - what do i need to do in css to get these links opened in new window?
We have a page the embeds a Google Calendar in an iframe. Recently, a warning box div began appearing on the calendar that looks like this:
<div id="warningBox" style="color:#aa0000;">Events from one or more calendars could not be shown here because you do not have the permission to view them.</div>
Obviously the best solution here is to find the private events and remove them, but so far the search for those events has proved fruitless. This calendar is an aggregate of several calendars, including a few we don't control (ie weather). We're still looking, but in the meantime, I would like to try to hide that div.
I know that iframes enforce the separation between the pages, such that the child page is pretty much a law unto itself. But surely there must be some way to set a style on an element inside the frame?
I'm looking to direct the user on the channell webpage instead of the video url that I'm embedding.
I've read the api and I didn't see any way to achieve this.
I tried enclosing the embedded video in a and I added this code:
$('#youtube').click(function() {
document.write('http://www.youtube.com/user/trasportareoggi');
return false;
});
And surprise it won't work.
How, if it's even possible I can do this?
I'd like to use the CSS property position:fixed to fix the position of an element but at the same time prevent the element from being positioned over my footer when the user scrolls to the bottom of the page. Is there a way of stopping an element from showing over a footer in this way?
I've created a simple menu and submenu with tags(not allowed to use ul elements). To access the submenu the user hovers their mouse over the menu item. I use the onmouseover and onmouseout events to either show or hide the sub menu depending on which item is selected.
A pipe (|) is used to seperate each submenu item and this is what is causing me problems.
When a user hovers their mouse above the pipe character the subMenu div calls the onmouseout event which is not what I want. So I added padding around the pipe character and a minus margin so that there were no gaps between the pipe character and the other elements.
This worked for all browsers including IE8. But in IE7 (I haven't tested IE6 yet) the submenu div calls the onmouseout event when I touch the top bit of either the left or right border of the pipe character span element.
<div id="subMenu" onmouseout="hideSubMenu()" >
<div id="opinionSubMenu" onmouseover="showOpinionSubMenu()">
<a id="Blogs" href="HTMLNew.htm">BLOGS</a>
<span class="SubMenuDelimiter">|</span>
<a id="Comments" href="HTMLNew.htm">COMMENTS</a>
<span class="SubMenuDelimiter">|</span>
<a id="Views" href="HTMLNew.htm">VIEWS</a>
</div>
<div id="learningSubMenu" onmouseover="showLearningSubMenu()">
<a id="Articles" href="HTMLNew.htm">ARTICLES</a>
<span class="SubMenuDelimiter">|</span>
<a id="CoursesCases" href="HTMLNew.htm">COURSES & CASES</a>
<span class="SubMenuDelimiter">|</span>
<a id="PracticeImpact" href="HTMLNew.htm">PRACTICE IMPACT</a>
</div>
</div>
This is my css class
#subMenu{
padding:10px 0px;
background-color:#F58F2D;
font-weight:normal;
text-decoration:none;
font-family:Lucida Sans Unicode;
font-size:14px;
float:left;
width:100%;
display:none;}
#Blogs, #Comments, #Views, #Articles
{
padding:10px 5px;
background:none repeat scroll 0 0 transparent;
color:#000000;
font-weight:normal;
text-decoration:none;
border:solid 1px black;}
#Blogs:hover, #Comments:hover, #Views:hover, #Articles:hover{
color:#ffffff;
text-decoration:none;}
.SubMenuDelimiter{
padding:10px 5px;
margin:10px -5px;}
Hi, I've been trying to make a button toggle a class, as well as show another div below it.
Here is a jsFiddle example I have made for you.
The first function works perfectly, shows and hides the div, but also I want the button itself to add and remove a class, I thought this would work but I seem to be doing something wrong.
Thanks.
I have a directory on my server that I do not want Search Engines to crawl and I already set this rule in robots.txt
I do want people that have logged in to be able to have access to this directory without having to enter a password or anything.
I am thinking that a cookie is the best thing to put on users computers after they login, and if they have a cookie, they can access the directory. Is this possible, or is there a better way?
I want people without this cookie to not have access to this directory - access for members only
Any suggestions on the best design for this?
I've been searching and i can't find any ff addons or javascript for finding unused css in ajax apps.
dust-me selectors
can do a site-crawl, but i'm looking for something that examines loaded-in content...
I'd like something where i can press 'record' and then make a load of clicks which will check off the used selectors, and hoping to find an existing one rather than try to write my own with jquery!
hi
in my project that is developed using palm technology ie webos ,in this application form is not get scrolling option automatically,so i have to apply scrollbar manually.with this user can feel userfriendly.could some help me in this isue hoe to apply scrolling manually.
thanking u
I have an element in a div, which has a background image. Below the div I have another div with another background image. Now the problem is that if the last element contained in the first div has margin-bottom applied there will be a gap between the 2 divs like this:
Notice the gray gap caused by the margin-bottom property of the h2 element contained within the first div. I know this can be solved if I switch margin-bottom to padding-bottom but what if I need margin-bottom?
How to fix this?
Hi guys,
I'm developing a Flash website (as3) where I need to be able to upload directly to YouTube by using the DATA API.
However in order to do so, I had to use a proper HTML form on top of my flash object.
Why? Because of the Browser Based Upload restictions.
I first hide the form using JQuery and with a little CSS the form is display just where I want it.
Within flash I use ExternalInterface.call() to show/hide the form when I need it!
ExternalInterface.call("YTUploader.showIt");
The upload process is working great my only problem is that the form can be displayed easily...
You just need a tool like firebug and you can use the form wherever you want on my flash app.
So I was wandering which will be the best way to 'protect' this form or the best way to limit its access.
Any advices will be appreciated.
Thanks for your time.
Jk.
I'm using Rad upload for drag and drop upload. It's working perfectly except I'm having a problem with the z-index. I'm also using jquery UI on the site and the overlay doesn't cover the applet.
Any ideas on how to control the z-index. It would be nice if there where a setting like in flash where you control wmode. But I've tried z-index on the div that controls it and no result.
I would like to take what text is in my p tag and make that the p tags parent (div) that ID. I would also like to add a _ for any spaces in the p tag.
Example:
<div class="circle"><p>Apple</p></div>
<div class="circle"><p>Banana</p></div>
<div class="circle"><p>Carrot Juice</p></div>
to
<div id="Apple" class="circle"><p>Apple</p></div>
<div id="Banana" class="circle"><p>Banana</p></div>
<div id="Carrot_Juice" class="circle"><p>Carrot Juice</p></div>
The Extjs API site adds a new tab for each search you do.
The tabs each have a red X on them to close the tab similar to what browsers have.
Check it out here:
I'd like to replicate this and it seems like something that would be built-in to the API, but cannot find it.
Any ideas?
Here's the issue. I have a database column called pymnt_meth_pref, which contains a comma separated string of payment methods chosen from a multiselect form.
<td>Payment Methods Used:<br />
<input type="checkbox" name="pyment_meth_pref[]" value="Cash">I can pay with cash.<br />
<input type="checkbox" name="pyment_meth_pref[]" value="Check">I can pay by check.<br />
<input type="checkbox" name="pyment_meth_pref[]" value="Credit Card">I can pay by credit card.<br />
<input type="checkbox" name="pyment_meth_pref[]" value="Paypal">I can pay with Paypal.<br /> </td>
This array is posted to a variable and turned into a comma separated string
if (isset($_POST['pyment_meth_pref']))
$pymntmethpref = implode(", ", $_POST['pyment_meth_pref']);
if (isset($_POST['pyment_meth_acc']))
$pymntmethacc = implode(", ", $_POST['pyment_meth_acc']);
This is then inserted into the database as a comma separated string.
What I would like to do, is take this string and apply the values to the original form when the user goes back to the form as 'pre-selected' checkboxes, indicated that the user has already selected those values previously, and keeping those values in the database if they choose to edit any other information in the form.
I'm assuming this would need to be done with javascript but if there is a way to do it with PHP I'd rather do it that way.
If you have ever used a new release of either Chrome or Safari, you know that when you add a new tab, the default screen is a grid like setup with your most favorite links sitting there waiting to be clicked on. What makes it even nicer is the graphical interface, with actual pictures of the websites they are representing.
I am looking to do something similar, how is it done? Are they simply iframes? iframes set with css? If anyone has any knowledge about the actual implementation of this seemingly simple festure, please share!! Thanks
<form enctype="multipart/form-data" method="post" action="mailto:[email protected]" accept-charset="UTF-8">
Is there a problem if mails are sent this way .. i wanna avoid using PHP codes..
I have a script that links to the server I am hosting (IP can change) usually I would just use for links:
var url ='http://' + window.location.hostname + 'end of url';
But in this case it isnt appearing to be so easy.
I have tried: (1)
$('#scriptid').attr('src', url);
as well as: (2)
var script = document.createElement( 'script' );
script.type = 'text/javascript';
script.src = url;
$("#insert").append( script );
Now case (2) works loads the script runs the script. But when at the end of my script it hits the 'write data' it decides to replace the entire page with just the data.
Any idea on how I can do this?
I know that I can assign an onclick action to <input type="button"-style buttons. But is it possible to let it behave like an <a> without using JavaScript? I ask because I'm in a situation where technically I'm better off using <a>'s, but buttons look nicer.
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 make a link from my website to facebook, that would allow me to login right in to my facebook, from any computer? Meaning, if I don't have cookies to store my login info in, is it possible to login still?
This is just a conceptual question, so any help would be appreciated! Thanks!
I'd like a select box that will alert the value when the user selects the option. (in iPhone)
<select>
<option>
1
</option>
<option>
2
</option>
<option>
3
</option>
</select>
In my web browser on the desktop, I can do: onclick, but on the phone, onclick doesn't work.
So here is the problem: I want to check if element <x-statement> is right next to <p> and there is no text in between them.
So this will return true:
<div>
<x-statement>[discover.prev]</x-statement>
<p>Go forward<p>
</div>
But this won't:
<div>
<x-statement>[discover.prev]</x-statement>
im in the way herr der
<p>Go forward<p>
</div>
This what I've tried to do:
if($(this).next().is('p')){
alert("p is next to you");
}
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 have a set of anchors like
<a class="lb" href="#">text</a>
<a class="lb" href="#" style="width:200px">text</a>
<a class="lb" href="#" style="color: reen; width:200px">text</a>
that needs to be transformed to the following:
<a class="lb" href="#"><span>text</span></a>
<a class="lb" href="#"><span style="width:200px">text</span></a>
<a class="lb" href="#" style="color:green"><span style="width:200px">text</span></a>
I have no problem creating child span but don't know how to move parent's width styling.