With the example below, I need to add padding and background-color properties to the text anchor. I then need to exclude padding and background-color from anchors that contain images.
<p>
<a href="#">this is a text link that needs to be styled</a>
<a href="#"><img src="image/name.jpg" alt="this needs to be excluded from styling" /></a>
</p>
If I have a red background and padding on my text links, I do not want that same red background and padding to appear on my linked images. The images will always be in their own anchors, not mixed with text within the same anchor.
The rub is that I can not add classes or IDs to the img tags - I do not have edit control of that data.
So how can I add CSS attributes to all anchors, while excluding anchors that contain images?
I am using a checkbox that has the name selectedids[], and I am trying to select all checkbox with the JavaScript but the code is not working. However, when I change the name of checkbox to selectedids it works but I can't do so because I need all the ids that are selected on the POSTED page.
The checkbox is as follow.
foreach($rows as $row)
{
<input type="checkbox" name="selectedids[]" value="<?php echo $row['id']; ?>" class="checkbox" />
........
........
}
And the Java-script function is as follow
function SetAllCheckBoxes(CheckValue)
{
var CheckValue=true;
if(!document.forms['main'])
return;
var objCheckBoxes = document.forms['main'].elements['selectedids[]'];
if(!objCheckBoxes)
return;
var countCheckBoxes = objCheckBoxes.length;
if(!countCheckBoxes)
objCheckBoxes.checked = CheckValue;
else
// set the check value for all check boxes
for(var i = 0; i < countCheckBoxes; i++)
objCheckBoxes[i].checked = CheckValue;
}
Please help me.
Thanks in advance..
I am developing a new e-commerce website in java. My index page has links such as Login etc. I had gone through other e-commerce sites such as ebay where they have option of My Account. My question is before signing in to the account ,why do they need this link My Account. what is the significance of this. can any web designer let me know the answer?
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>
We have a long page that contains a bunch of different form elements. One part of the form is called remotely via AJAX and is populated in an empty div. This is the part which JQuery Validation plugin is not working correctly on.
We have class="required" on the elements on this page, but they do not show up as required. I'm guessing it's because the Validation plugin is looking for class="required" on our main page, and since the content from the AJAX page is put into the empty div behind the scenes, it's not detected the required fields.
Any help is greatly appreciated.
<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'm beginning to think this is impossible, but thought I'd ask you guys.
Basically it's a 2 column layout, but the "business" wants the following:
-Always take up the entire browser window
-Accommodate resizing of browser window
-Left column will be fixed width, but that width should be flexible from page-to-page.
-Left column has a region at the top with fixed height.
-Left column has a bottom region. It should take up the remaining vertical space of browser window. If content is very large, it will have a scroll bar just for that region.
-Right column should take up remaining horizontal space of browser window.
-Right column has a region at the top with fixed height.
-Right column has a bottom region. It should take up the remaining vertical space of browser window. If content is very large, it will have a scroll bar just for that region.
I've tried everything...divs, floated, absolutely positioned, tables, divs in tables...
Is this even possible?
Here's an image of what it should look like:
http://imgur.com/zk1jP.png
Hi,
Currently, I have a carrousel on javascript which works when we click on hyperlink, like this :
<div id="direction1">
<p>
<a href="javascript:" class="carousel-control" rel="next"><img class="fleche_suiv" src="/project/images/next.png" alt="Suivant" title="Suivant" />
</a>
</p>
</div>
I would like execute this evenment with a onMouseOver too.
So I try this, but it doesn't work :
<div id="direction1">
<p onMouseOver="this.getElementsByTagName('a').click()">
<a href="javascript:" class="carousel-control" rel="next"><img class="fleche_suiv" src="/project/images/next.png" alt="Suivant" title="Suivant" />
</a>
</p>
</div>
How to fix it ???
Hello friends,
I have a JSP page on which I have a div tag in which there is a a IMG tag. Using this IMG tag I want to show an image in it. Here the source path of an image is comes from database so I assigned a JSP variable using JSP scriplet. This JSP variable have the source path of an image.
This path of image may be of different machine or of same machine i.e. images are stored on different machine or on same machine i.e. on local machine on different drive.
The problem is that how to give path of image stored on different machine as well as on same machine. I have tried different ways like by giving ip address of that machine.
Here is the path that of local machine where the image is stored
img src= file:\localhost\D:\ScannedSheets\testproj/batch1/IMG001.jpg style="z-index:1; position:absolute; top:0; left:0; width:850; height:1099"
With this syntax the image is visible in Internet Explorer but With the same syntax Its not visible in FireFox, Google Chrome etc.
Please Guide me in friends.
Also tell me that how to give path of the image stored on different machine which works In Internet Explorer, FireFox, Google chrome etc.
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.
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?
How could I have the tab to be on hover mode while I rollover the drop down sub-menu.
Does it require javascript or it could be done solely on CSS?
<li id="anchor" class="title dropdown"><a href="#">Main Tab</a>
<div class="column">
<ul>
<li class="subtitle">Button 1</li>
<li class="subtitle">Button 2</li>
<li class="subtitle">Button 3</li>
</div>
</li>
I have a dictionary in jsons form like this:
$user = "{ name: Mary , born: 1963, money: 213 }";
I need to pass it throught this field:
<input type="hidden" name="custom" value="" >
and then insert it in the db:
INSERT INTO user ( name, born, money ) VALUE ( $name, $born, $money )
How can I do that ?
I am working on a website: http://www.bbp.nl/luuk-test/wac
It displays really well on FF and IE.
I went tot test it in chrome and it is totally messed up.
Somehow chrome displays all the divs underneath each other.
I really dont know where to look since it also validates well in W3C validator.
Also googled it, but could not find anything. Does anyone knows the answer?
Please help.
I am making a website in Adobe Dreamweaver with php. In the site there’s a 3 buttons for selecting payment method that will act as the continue button. What I want is when the user checks a radio buttons (I agree button), it will be add with that amount and display with previous amount.. there is three buttons which has the corresponding values(amount in pounds)..
plz check my website http://www.spsmobile.co.uk in this linkgo to mobile phone unlocking and after add the cart click make payment it will go to next page there is a delivery mail details.. for that delivery mail details only am asking..
here i mentioned code:
<input id="radio-1" type="radio" name="rmr" value="1">
<label for="radio-1">£3</label> <input id="radio-2" type="radio" name="rmr" value="2">
<label for="radio-2">£5.5</label>
<input id="radio-3" type="radio" name="rmr" value="4">
<label for="radio-3">£10</label>
<div class="total-text" style="font-size:36px">£10</div>
var total = parseInt($("div.total-text").text().substring(1), 10);
$("input[name='rmr']").bind('change', function() {
var amount = 0;
switch (this.value) {
case "1":
amount = 3;
break;
case "2":
amount = 5.5;
break;
case "4":
amount = 10;
break;
}
$("div.total-text").text("£" + (total + amount));
});
but there is no change , my previous amount did not add with that. while am clicking previous amount only displayed on browser.. i need when i cliks radio button the value should change correspondingly.. where i did that mistake...plz give me some idea and what should i do..is there any need for storing db..
thanks in adv
Hi,
My question is simple: is there a way to animate the maximize of ExtJS windows? Currently my windows just maximize without any animation and it looks "boring".
Hello everybody,
I have multi-step form and user can navigate to any page to modify or add information. There is a menu that shows progress and steps user completed. This menu allows to navigate to any step user completed or going to complete.
Inspite of big button "Save and Continue" some users click this menu to navigate further. I have to check - if values have changed in a form and ask: "Save changes? Yes/No".
What is the best way (with minimum code) you suggest me to check if form values have changed.
Thank you in advance!
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.
Hello,
I was able to get the navigation dropdown to show the letters in a different color from the background (white in this case) in Chrome browser. But when I view the same page in IE or FF, the whole background is just all green.
Here is an example of such a page:
http://www.comehike.com/hikes/hikes_and_groups.php
And here is the CSS code that makes the color show up white in Chrome
navigation li li a
{color:#white; text-decoration:none;}
To see the difference, just mouse over the top right where it says "community" or "hikes"
Thanks,
Alex
how can I modify the embedded photo gallery slideshow from Google's Picasa to auto repeat the pictures, i.e. play them over and over again? This is the code Picasa gives me for embedding in a website:
<embed type="application/x-shockwave-flash" src="http://picasaweb.google.com/s/c/bin/slideshow.swf" width="400" height="267" flashvars="host=picasaweb.google.com&hl=en_US&feat=flashalbum&RGB=0x000000&feed=http%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2F102341124641778821128%2Falbumid%2F5469290618448219537%3Falt%3Drss%26kind%3Dphoto%26hl%3Den_US" pluginspage="http://www.macromedia.com/go/getflashplayer">
Related to this, are there free tools that take as input a Picasa username or a set of photos and automatically create a thumbnailed gallery, which is embeddable using Flash in any website?
thanks.
Hi,
on a website i'm currently developing I'm using jquery to do all sort of magic things :-)
In firefox however, when I load jquery 1.4.2 there are sometimes funny characters in front of the request.
You can see the strangers characters in this screenshot (thank you firebug).
In safari, Chrome and IE these funny characters don't appear, jquery is loading fine in those browsers.
Why are those characters appearing and how can I remove them?
Thanks!!
hi please check the below code i am trying to open tab with name
and after that try to close that tab but unable to close
or else can anyone tell how we can close opened all tab (url1,url2) from parent tab (url) while close parent tab
error in firebug is my_window is undefined
<form name="submitForm1" target="my_window" method="POST" action="http://localhost:8080/ADDMIBREP/">
<input type="hidden" name="uname" value="uname">
<a HREF="javascript:document.submitForm1.submit();">ADDMIBREPORT</a>
</form>
<a HREF="javascript: closepopup() ">remove</a>
</body>
<script>
function closepopup()
{
alert("hi");
if(false == my_window.closed)
{
my_window.close ();
}
else
{
alert('Window already closed!');
}
} <script>
I want to redirect from a old url which still appears in the google search to the new one. the old url is this:
http://www.marionettecolla.org/file%20_mostra_milano/mostra_marionette-milano.htm
and I want to redirect it to the home page:
http://www.marionettecolla.org/
I used this in my .htaccess:
Redirect http://marionettecolla.org/file\ _mostra_milano/mostra_marionette-milano.htm http://marionettecolla.org/
but I am getting Error 500... Does anybody know how to solve this problem?