do you mean you want to count how many dropdowns have a selection at all?
riahc3 commented: That was it +4
kevwood commented: great response. +0
do you mean you want to count how many dropdowns have a selection at all?
How about
str = str.replace(/\u0160/g,"");
taking the plus out would replace all whitespace chars with nothing
variable.replace(/\s/g,"");
if it's not working maybe there's something in the code surrounding this that needs debugging.
I've ended shortening then script at the same time. I swapped your textarea out in favour of a div and put all your urls in a object literal. (could have been an associative array. Makes no difference really.
<script type="text/javascript">
links = {
A:"https://ical.bookeo.com/20212KWWNLA1396F7FEA1BWFW3J6/LHRAKRK63FAMPJP6/Z/I21263C4FA139C15D7BAC/ical.ics",
B:"https://ical.bookeo.com/20212KWWNLA1396F7FEA1BWFW3J6/LHRAKRK63FAMPJP6/Z/I212NEKA9Y139E57D8DDA/ical.ics",
C:"https://ical.bookeo.com/20212KWWNLA1396F7FEA1BWFW3J6/LHRAKRK63FAMPJP6/Z/I212WPEPUP1396F85E02B/ical.ics",
D:"https://ical.bookeo.com/20212KWWNLA1396F7FEA1BWFW3J6/LHRAKRK63FAMPJP6/Z/I212NEKA9Y139E57D8DDA/ical.ics",
E:"https://ical.bookeo.com/20212KWWNLA1396F7FEA1BWFW3J6/LHRAKRK63FAMPJP6/Z/I212ETT9PK139C15F2C25/ical.ics",
F:"https://ical.bookeo.com/20212KWWNLA1396F7FEA1BWFW3J6/LHRAKRK63FAMPJP6/Z/I212Y6WMF4139C1C22637/ical.ics",
G:"https://ical.bookeo.com/20212KWWNLA1396F7FEA1BWFW3J6/LHRAKRK63FAMPJP6/Z/I212AT4NRY139C165DB97/ical.ics",
H:"https://ical.bookeo.com/20212KWWNLA1396F7FEA1BWFW3J6/LHRAKRK63FAMPJP6/Z/I212XH7AWH139C160ED75/ical.ics",
I:"https://ical.bookeo.com/20212KWWNLA1396F7FEA1BWFW3J6/LHRAKRK63FAMPJP6/Z/I2123X6H36139C1C1A4E5/ical.ics"
};
function fifa()
{
var link = document.getElementById("link");
var frm = document.forms[0];
var abc = frm.browsers.value;
link.innerHTML = "<a href=\"" + links[abc] + "\">" + links[abc] + "<\/a>";
}
</script>
</head>
<body>
<center>
<form name="form1">
Subscribe to your calendar link:
<select id="browsers" onchange="fifa()">
<option value="0">- choose a tutor -</option>
<option value="A">Ashley C.</option>
<option value="B">Danielle C.</option>
<option value="C">Jon S.</option>
<option value="D">Mekenna M</option>
<option value="E">Norma C.</option>
<option value="F">Tyler K.</option>
<option value="G">Vanessa A.</option>
<option value="H">Veronica G</option>
<option value="I">William K.</option>
</select><br><br>
<div id="link" style="width:400px; height:100px;">
</div>
</form>
<script>
var hidden = true;
function ToggleTB(){
var tb = document.getElementById("divText");
if(hidden){
tb.style.display = "block";
hidden = false;
}else{
tb.style.display = "none";
hidden = true;
}
}
</script>
<input type="radio" onclick="ToggleTB();" checked />
<div id="divText" style="display:none;"><textarea></textarea></div>
Having the global 'hidden' variable to check against means that the textarea's display can be checked from the start without inline sty;e being set.
what @JorgeM said is the only reason I said that I would use JQuery. It's not that there's anything wrong with the CSS transitions but I know it won't work on everyone's browser. It's just personal choice at the end of the day.
the good thing about CSS3 transitions is that, for browsers that support it, it will work as most (or none as far as I'm aware) browsers don't have a setting to turn CSS off but they do for Javascript.
I, personally would never dream of using an out of date browser. but there are people who don't update them. there are also alot of actual organisations that (for some odd reason) stay 2 versions behind the latest at all times. this is where JQuery (or even native js) come in.
Hi. looking at the css on the site they are actually using CSS3's transitions.
have a look here http://www.w3schools.com/css3/css3_transitions.asp for a little help on it. personally, I would probably use JQuery for it.
No problem...I have fell for that a few times. I think it was with background images too. glad you got it sorted. Please vote up my answer and mark as solved. : )
So if I understand correctly, your folder structure is as follows.
index.html
css/main_style.css
images/buttons/main_link_bg.png
your css seems fine to me. the url function in css is relative to the css file it self. The only thing I can think is maybe the browser is loading cached versions of your other pages. Have you tried to refresh on the other pages. sometimes it's worth holding down the refresh key to get to force a new version of the page. Or just try them in a different browser to see if the BG image is still missing