javascript - How can I click the login image without Id or Name in website? -


i wanna write code via vba automatically login website.

and login "button" "login image", without id or name. don't know how make vba "left mouse click" on "login image".

addtionally, noticed when move mouse onto "login image", left-bottom corner displays: \smcvdol\logon

may help...i don't know javascript @ all

here's it:

<td align=right width="20%" height="21"><input type="image" src="../img/dl.jpg" width="63" height="22" border="0" onclick="javascript:submitform();" style="cursor: pointer;"></td> 

and here's submitform():

<script>  function submitform(){  if(frm.authid.value==''){  alert("please enter user name!");  frm.authid.focus();  return false;  }else{  frm.submit();  }  }  function reset_text(){  document.getelementbyid('username').focus();   }  </script>  

here's code, still missing last step:('###the site unaccessible out of our company###)

sub macro1()  dim ie object  set ie = createobject("internetexplorer.application") ie.visible = true ie.navigate "http://10.90.15.247/smcvdolweb/jsp/login.htm"  while ie.busy or ie.readystate <> 4 wend  ie.document.getelementbyid("username").value = "admin" ie.document.getelementbyid("password").value = "1234"   end sub 

any appreciated.

get object type getelementsbytagname , loop correct one


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -