Using a regex:
foreach (array_keys($array) as $search) {
if (preg_match('/^FILL_YOUR_STUFF_(\d+)_NUMBER$/', $search, $matches)) {
print_r($matches);
}
}
alert(findHighestZIndex(div));
/**
* Finding the highest z-index element in a document
* @param elem
*/
function findHighestZIndex(elem)
{
var elems = document.getElementsByTagName(elem);
var highest = 0;
for (var i = 0; i < elems.length; i++)
{
var zindex=document.defaultView.getComputedStyle(elems[i],null).getPropertyValue("z-index");
if ((zindex > highest) && (zindex != 'auto'))
{
highest = zindex;
}
}
return highest;
}
First of all, the html:
<input id="imagefile" type="file" style="display:none;" name="uploadedfile"/> <a class="btn-img" href="#"><img alt="Browse" src="/public/images/add.gif"></a>
Second, the jquery:
<script type="text/javascript">
$(document).ready(function() {
$("A.btn-img").click(function () {
$("#imagefile").trigger('click');
});
});
</script>
You created a form, but your client doesnt want a ugly submit button but plain text. Now your enter (or break) key will not submit the form anymore… There is a fix for that
<input name="password" type="password" onclick="if(this.value == '********') this.value = ''" onblur="if(this.value == '') this.value = '********'" value="********" onKeyPress="submitMe()" />
function submitMe() {
if (window.event.keyCode == 13)
{
document.loginForm.submit();
}
}
<input id="submit" type="submit" value="Send" name="submit">
#submit {
background: url("/images/login.gif") no-repeat scroll 0 0 #FFFFFF;
border: medium none;
font-size: 0;
height: 35px;
width: 75px;
}