/    Sign up×
Community /Pin to ProfileBookmark

Autofill – Can anybody do this?

[CODE]<HTML>
<HEAD>
</HEAD>
<script type=”text/javascript”>
document.onmouseover = doDocumentOnMouseOver;
document.onmouseout = doDocumentOnMouseOut;
var watson_window;
function openWatson() {
var url = ‘https://watson3.t-mobile.com/watson.html’;
// alert(“URL= ” + url);
//alert(“watson_window =” + watson_window);
if(watson_window != null && !watson_window.closed)
{
try
{
var fConfirm = window.confirm( “The currently open Watson window will be closed, and anyractivation data there will be lost. Are you sure?” );
if ( fConfirm )
{
watson_window.close();
}
else
{
watson_window.focus();
return;
}
}
catch (error)
{
return;
}
}
// if(watson_window != null) watson_window.close();
watson_window = window.open(url,”WATSON”,”toolbar=1,location=1,directories=0,status=1,resizable=no,menubar=1,width=775,height=550,screenX=5,screenY=5,scrollbars=yes”);
watson_window.focus();
}

[COLOR=”DarkOrange”]function autofill() {
watson_window.top.middle.document.getElementByName(“username”).value = “userID”;
}[/COLOR]

</script>
<body leftmargin=”10″>
<A ID=Anything1 HREF=”JavaScript:openWatson()” class=Outline2 border=”0″ > Logon</A><br>

<a href=”JavaScript:autofill()”>autofill</a><br>

</body>
</HTML>[/CODE]

This code pops up new window named “WATSON” and the new window opens “https://watson3.t-mobile.com/watson.html.” I want to fill out username and password fields on new window clicking “autofill” link on opener page. I highlighted the function to do it. Can anybody fix this. It would be BIG help. plizzzzzzzzzzzz!!!!

to post a comment
JavaScript

9 Comments(s)

Copy linkTweet thisAlerts:
@FangJun 12.2008 — Looks like it's cross domain, then no. it won't work.
Copy linkTweet thisAlerts:
@kangjorauthorJun 12.2008 — Is there other way for this cross domain?
Copy linkTweet thisAlerts:
@FangJun 12.2008 — Not if the protocol is different.
Copy linkTweet thisAlerts:
@kangjorauthorJun 12.2008 — You mean it's possible if the protocol is same as "https://"? Thx for quick reply thou
Copy linkTweet thisAlerts:
@FangJun 12.2008 — Try using the domain property, it is a security risk and buggy in some browsers.
Copy linkTweet thisAlerts:
@kangjorauthorJun 12.2008 — function autofill() {

document.domain = "watson3.t-mobile.com";

watson_window.middle.document.getElementByName("username").value = "kangjor";

}

gave a try, Can I use like this? I don know how to use it.
Copy linkTweet thisAlerts:
@FangJun 12.2008 — Set both documents with [I]document.domain = "t-mobile.com";[/I]
Copy linkTweet thisAlerts:
@kangjorauthorJun 12.2008 — Thx a lot, I will give a try.
Copy linkTweet thisAlerts:
@NallanchakraJun 23.2008 — Hello,

I read your posts. Could you manage to find a solution. If so will you be able to share it in the forum. I am interested. Did you try the same for Sprint or Verizon or any other carrier?

Nallan
×

Success!

Help @kangjor 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 5.4,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

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