Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
JS Newbie - Needs Help.
Old 06-09-2005, 04:32 PM JS Newbie - Needs Help.
pincushionboy's Avatar
Skilled Talker

Posts: 73
Name: Kieth
Location: Orlando, FL
Trades: 2
Hi All,


Was wondering if anyone knows of a script or way to have data entered into a text box added to an html string and return the result in a popup or the same page.

I.E.

http://webmastertalk.com/images/(fill from text box).jpg

In the text box users could enter " 54321 "

and upon clicking a button the html link would change to:

http://webmastertalk.com/images/54321.jpg

and open the html link in a different window.


Seems like a simple script, just want to see if anyone has done anything or seen anything like this to save me time. Thanks.
pincushionboy is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-09-2005, 04:53 PM
funkdaddu's Avatar
Web Design Snob

Posts: 635
Trades: 0
Like this?:

HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

	<head>
		<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
		<title>Untitled Page</title>
		<script type="text/javascript"><!--
function goURL() {
	myText = document.getElementById("theText").value;
	window.open('http://www.theurl.com/' + myText + ".jpg");	 
}
//-->
</script>
	</head>

	<body bgcolor="#ffffff">
		<p><input type="text" id="theText" size="24"><input type="submit" name="submitButtonName" onclick="goURL();"></p>
	</body>

</html>
funkdaddu is offline
Reply With Quote
View Public Profile Visit funkdaddu's homepage!
 
Old 06-10-2005, 11:27 AM
pincushionboy's Avatar
Skilled Talker

Posts: 73
Name: Kieth
Location: Orlando, FL
Trades: 2
I tried this script, but I couldnt get it to work.

I am using this url string in the script:

<script type="text/javascript"><!--
function goURL() {
myText = document.getElementById("theText").value;
window.open('http://www.artframedirect.com/images/products/large/' + myText + ".jpg");
}
//-->
</script>


I am entering: 10249900 in the search query which should search for the following url
http://www.artframedirect.com/images...e/10249900.jpg
which is valid and would return the resulting image.


Please advise. Thanks.
pincushionboy is offline
Reply With Quote
View Public Profile
 
Old 06-13-2005, 01:48 PM
funkdaddu's Avatar
Web Design Snob

Posts: 635
Trades: 0
does the window not pop up? or does it pop up and not return the url? Using your code and numbner it works for me on Safari, Firefox and IE for mac...
funkdaddu is offline
Reply With Quote
View Public Profile Visit funkdaddu's homepage!
 
Reply     « Reply to JS Newbie - Needs Help.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13134 seconds with 12 queries