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.

HTML Forum


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



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
How to add a number via an input form to a surfer friendly urls?
Old 04-05-2009, 07:03 AM How to add a number via an input form to a surfer friendly urls?
Junior Talker

Posts: 2
Name: Irakli
Trades: 0
Ok, I am lost, dont know if this thread should go into JS or if it can be accomplished using plain html... Here goes..
I need to add a number to a surfer friendly url via an input for that a user types in.
The url is http://property.viriko.com/listing/details/[ID HERE]
The reason I need this is "quick search" when the person knows the number which is required - page with input form is located on http://www.viriko.com
Anyway on accomplishing my goal? Thanks
ikotua is offline
Reply With Quote
View Public Profile Visit ikotua's homepage!
 
 
Register now for full access!
Old 04-05-2009, 06:41 PM Re: How to add a number via an input form to a surfer friendly urls?
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
This can't be done directly by a form because the field name is included in a posted URL, but can be done with a bit of javascript. This could be done with URLs of the form http://..../?property_id=[ID HERE] with this:

HTML Code:
<form method="get" action="http://.../">
<input type="text" name="property_id" />
<input type="submit" value="Search" />
</form>
For a javascript solution matching exactly what you've asked for, try

HTML Code:
<script>
function propertyIdRedirect() {
  new_url = "http://.../";
  new_url += document.getElementById('property_id').value;
  location.href=new_url;
  return false;
}
</script>
<input type="text" id="property_id" />
<input type="button" value="Search" onClick="return propertyIdRedirect();"/>
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 04-06-2009, 07:00 AM Re: How to add a number via an input form to a surfer friendly urls?
Junior Talker

Posts: 2
Name: Irakli
Trades: 0
Thank you! Your contribution is greatly appreciated and it works perfectly!
ikotua is offline
Reply With Quote
View Public Profile Visit ikotua's homepage!
 
Reply     « Reply to How to add a number via an input form to a surfer friendly urls?
 

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.85478 seconds with 12 queries