/    Sign up×
Community /Pin to ProfileBookmark

Firefox version of this script

Hi

The script below does not work on firefox !
How can i adapt the script to make it work on firefox ?

[code]
<html>
<head>
<title>title</title>
<script language=’JavaScript’>
function showField() {
var largerImage = document.getElementById(“largerImageField”);
var uploadedFile = document.getElementById(“uploadedFile”);
var multimidia = document.getElementById(“f_tp_multimidia”);

if(uploadedFile.value!=”” && multimidia.value==”4″)
{
largerImage.style.visibility = ‘visible’;
} else {
largerImage.style.visibility = ‘hidden’;
}

}
</script>
</head>
<body>

<form name=’frm’ id=’frm’ enctype=’multipart/form-data’ action=’salve.php’ method=’POST’ target=’control’>
<table>
<tr>
<td>Multimidia Type : </td>
<td><select name=”f_tp_multimidia” id=”f_tp_multimidia” size=1 onChange=”showField()”>>
<option value=”3″ >Sound</option>
<option value=”4″ >Image (58×58)</option>
<option value=”2″ >Video</option>
</select>
</td>
</tr>

<tr>
<td>File: </td>
<td>
<input type=’hidden’ name=’uploadedFile_last’ value=”>
<input type=’file’ name=’uploadedFile’ size=’60’ onfocus=”showField()” >
</td>
</tr>
<!– Will appear only if the user select Image (58×58) –>
<tr>
<td colspan=’2′>
<fieldset align=’left’ id=’largerImageField’ style=’visibility:hidden’>
<label>Larger Image: &nbsp;<input type=’file’ name=’largerImageField’ size=’60’/></label>
</fieldset>
</td>
</tr>
</table>
</form>

</body>
</html>
[/code]

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@BrownBearJul 20.2006 — try to replace

multimidia.value

with

multimidia.options[multimidia.selectedIndex].value
Copy linkTweet thisAlerts:
@amrigoauthorJul 20.2006 — No it does not work, the script open with the field "largerImageField" already opened

thank´s for trying to help me !
×

Success!

Help @amrigo spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...