Alternatives for click()?

chantel1123

Registered
Hi,

It seems that the button.click() event isn't supported in safari browser... any thoughts on how i may go about this? :)

Thanks in advance!
 
More information please. Are you using some kind of server side programming language to do this or Dreamweaver?
 
It seems that button.click() is probably ASP code, which is, technically, only available on the Windows platform.

Could you use a JavaScript function instead, say, the "onClick" event?
 
I don't know much Javascript, but button.click() appears to simulate a button click while onClick is a response to a button being clicked.
 
A sample code would be as such:

<html>
<head>
<script language="javascript">
function clickButton2(){
document.getElementById("button2").click();
}
</script>
</head>
<body>
<form>
<input type="button" name="button1" id="button1" value="button1" onClick="clickButton2();"/>
<input type="button" name="button2" id="button2" value="button2" onClick="alert('button2 clicked!');"/>
</form>
</body>
</html>
 
Back
Top