It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming HTML Forum

Help me with simple text box...

Help me with simple text box...

Postby symbiosis on Sat Oct 04, 2008 6:07 pm

I am trying to insert a text box to perform a simple function. Whatever text is inserted into the box, I want the box to cause that word + .htm to open that page in my domain.
www.ashevillecabinets.com/clients.htm

Example: if the client enters "smith" in the box, I want a new window to open at location "/smith.htm"

Anyone?
symbiosis
 
Posts: 2
Joined: Sat Oct 04, 2008 5:57 pm
Location: Asheville, NC

Postby rangana on Tue Oct 07, 2008 2:19 am

Hope this basic example helps:
Code: Select all
<input type="text" id="url"><input type="button" value="Send" onclick="location.href=document.getElementById('url').value+'.htm'">
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines

Postby LOLWUT44 on Tue Oct 07, 2008 8:03 pm

save as .html it will work better.
LOLWUT44
 
Posts: 4
Joined: Sun Oct 05, 2008 11:09 pm

Postby rangana on Wed Oct 08, 2008 12:08 am

LOLWUT44 wrote:save as .html it will work better.


Saving it as .html or .html makes no difference, not unless I miss something else :roll:
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines

Postby LOLWUT44 on Sat Oct 11, 2008 9:37 pm

According to XHTML standards i read somewhere your pose to save it as html. i know it probably wouldnt make a difference but you never know.
LOLWUT44
 
Posts: 4
Joined: Sun Oct 05, 2008 11:09 pm

Postby rangana on Sun Oct 12, 2008 3:00 am

Could you show me a sample page where html extension differs that of htm.

...or you mean something else which I'm unaware?

In XHTML standards, the only thing that is vital on a page (and that is for validtion), is that you should close all your tags, which includes self-closed to the tags which does'nt have a closing tag. Example would be img, br, hr . In XHTML, name is deprecated.
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines

Postby flabbyrabbit on Sun Oct 12, 2008 10:56 am

Other then the obvious, the letter "L," there's not much of a difference between the two extensions

http://www.sightspecific.com/~mosh/WWW_FAQ/ext.html
Image
User avatar
flabbyrabbit
500+ Club
 
Posts: 706
Joined: Thu Jan 25, 2007 1:10 pm
Location: Midlands, England

Thanks, worked great, BUT..

Postby symbiosis on Mon Oct 13, 2008 5:45 pm

I tried to add the target tag. "_blank" but the page doesn't respond to it.
I changed the tag to .pdf as I am loading the customer images and specs as a pdf binder (kovalchuk is an example password). I would prefer this to open in a new window so as not to lose my client if they should accidentally "x" out of the page.

Thanks
symbiosis
 
Posts: 2
Joined: Sat Oct 04, 2008 5:57 pm
Location: Asheville, NC


Who is online

Users browsing this forum: No registered users and 4 guests