0

I have used this statement many times before but recently I encountered few pages where im trying to assign value to field which does not exist.

Field im trying to assing value to is:

<div id="userName" class="logon_input">

User Name:

i tried using code such as

    Document.getElementById("username").Value = "cde"

i can successfully edit some pages but im having issues with specific few sites

could this have something to do with any of this:

IFRAME 
align="center" width="80%" SRC="jsp/listing/blank.jsp"
onload='resizeFrameToContent("infoView_home")' FRAMEBORDER="0"
name="infoView_home" id="infoView_home" title="Log On</IFRAME>

ml>
<head>

<body onload="logonPageLoad()">

<div class="logonContainer">
<div class="logonBanner">
<div class="logonSection">
<div class="logonIFrame">
<iframe id="infoView_home" width="80%" frameborder="0" align="middle" title="Log On"     name="infoView_home" onload="resizeFrameToContent("infoView_home")"     src="jsp/listing/blank.jsp" style="height: 257px;">
<html class="logon_body">
<head>
<body class

=

live2ride
  • 41
  • 1
  • 2
  • 7
  • 1
    What do you mean by "not working". Are you getting an error? – GTG Nov 15 '12 at 08:07
  • 2
    What does this have to do with VBA? – Zev Spitz Nov 15 '12 at 08:47
  • What returns the Document.getElementById("username")? If u try dim field as variant set field = Document.getElementById("username"), is the field Not Nothing? – Daniel Dušek Nov 15 '12 at 09:25
  • 1
    if youre going to close the post the least you can do is provide a link that answers a question. i tried everything to find an answer to my problem with no luck. if you refuse to participate and answer peoples questions at least you can leave the post open for others to answer. if not then whats the point of asking at all – live2ride Nov 15 '12 at 22:03
  • http://stackoverflow.com/questions/11048940/vba-getelementbyid-with-dynamic-id – Pynner Nov 16 '12 at 01:50

0 Answers0