Helpful Information
 
 
Category: Small projects (quick fixes and changes)
Fix This code for $5

1) Project Details: (be as specific as possible): I want you to fix this code so it would work in IE and firefox. Also The code does not switch the style more then once on firefox with the current state it is in. Adding the .css extension will make it not switch the style at all. I do, however, have the files with the correspondingly names 1.css, 2.css, 3.css in the same directory as 1, 2, 3 if that will help making a working code.

<head>
<link href="http://www.igotacha.com/myspace/hearts/1" rel="stylesheet" id="css1" type="text/css" />
<script type="text/javascript">

function change(){
document.getElementById('css1').href='http://www.igotacha.com/myspace/hearts/2';
document.getElementById('css1').href='http://www.igotacha.com/myspace/hearts/3';
}
</script>
</head>
<body>
<select id="css1">
<option value="1" onclick="change();">Green N Black Hearts</option>
<option value="2" onclick="change();">Green N Black Hearts2</option>
<option value="3" onclick="change();">Green N Black Hearts3</option>
</select>
</body>

2) Payment Amount: $5

3) Payment method/ details (Paypal, check? Timeline?): Paypal, mail

4) Additional Info (about project or potential bidders):

Send a 1, 2 or 3 to the change() function, i.e. onclick="change(1);".

Add an argument to the change() function i.e. change(cssValue) {} and append it to the href assignment, i.e. document.getElementById('css1').href='http://www.igotacha.com/myspace/hearts/' + cssValue;.

May i ask that you modify the code? I'm new and what you just said confuses me.

This is what Fumigator meant:



<head>
<link href="http://www.igotacha.com/myspace/hearts/1" rel="stylesheet" id="css1" type="text/css" />
<script type="text/javascript">

function change(cssValue){
document.getElementById('css1').href='http://www.igotacha.com/myspace/hearts/'+cssValue;
}
</script>
</head>
<body>
<select id="css1">
<option value="1" onclick="change(1);">Green N Black Hearts</option>
<option value="2" onclick="change(2);">Green N Black Hearts2</option>
<option value="3" onclick="change(3);">Green N Black Hearts3</option>
</select>
</body>










privacy (GDPR)