/    Sign up×
Community /Pin to ProfileBookmark

load url javascript code question

I have two issues can an alert be fired

prior or can a target be used

<script type=”text/javascript”>

function get(eid) {

var d = document;

var r = d.getElementById(eid);

return r;

}

function loadUrl(){

var url = get(‘url’).value;

get(‘urlView’).src = url;

}

</script>

<form>

<input type=”text” id=”url” />

<input type=”button”
value=”Submit”
onclick=”loadUrl();” />

</form>

<iframe id=”urlView” scrolling=”no” width=”200″ height=”100″ align=”center” frameborder=”0″ src=””></iframe>

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@Sup3rkirbyNov 16.2012 — I'm not sure what your question is, your code seems fine and works. What do you need to fire an [B][FONT=Courier New]alert()[/FONT][/B] for? Also please use code tags when pasting source code.
×

Success!

Help @jase 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.16,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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