/    Sign up×
Community /Pin to ProfileBookmark

"custom location bar"

I’m trying to get a variation of the CUSTOM LOCATION BAR on [url]http://www.sivamdesign.com/scripts/navigate.html[/url] (code can be found at [url]http://www.sivamdesign.com/scripts/dwld/location.txt[/url] )to work.

Basically, I want to have users enter a string (e.g., 1234) into a text box, click on the GO button, and then be taken to
[url]http://domain.com/page.php?1234[/url]

Is that possible, and if so, how is it done?

Any help is greatly appreciated!

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@A1ien51Jan 27.2009 — Very basic idea:
<i>
</i>&lt;input type="text" id="tb" /&gt;
&lt;input type="button" value="go" onclick="newPage();" /&gt;
&lt;script type="text/javascript"&gt;
function newPage(){
var num = document.getElementById("tb");
document.location.href = "http://www.example.com?" + num;
}
&lt;/script&gt;


Eric
×

Success!

Help @ryoung 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.9,
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,
)...