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
Putting something from a form on the end of a link
Old 04-10-2008, 05:12 AM Putting something from a form on the end of a link
tuestunim's Avatar
Experienced Talker

Posts: 41
Name: Scott Brown
Location: Huddersfield, UK
Trades: 0
Hi,

Not sure if this should like here or in JavaScript or whatever (depends on the answers I get I suppose!) but I hope someone can suggest something.

I have a link that looks like this:

http://www...com/basket.html?screen=...931:quantity=1

You see that quantity=1 at the end? I want to be able to have a link that doesn't have the '1' but can pick up a number entered into a text box.

I'm sure there's a way of doing this but I don't know how. Do you?

One stumbling block is that it's a website with online admin. I don't have general access to the FTP server and I don't know what kind of server it's running on so no ASP or PHP can be used. I'm hoping there's an HTML or javascript answer to this.

Cheers for reading, hope you can help.

Scott.
tuestunim is offline
Reply With Quote
View Public Profile Visit tuestunim's homepage!
 
 
Register now for full access!
Old 04-10-2008, 05:22 AM Re: Putting something from a form on the end of a link
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,382
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
POST the form to put the form values into a querystring
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-10-2008, 05:48 AM Re: Putting something from a form on the end of a link
tuestunim's Avatar
Experienced Talker

Posts: 41
Name: Scott Brown
Location: Huddersfield, UK
Trades: 0
Cheers for your help Chris but I'm not quite there yet.

I've got this:

<form method="post" action="http://www...com/basket.html?screen=basket&action=update&basket:559 e250cb34d33c4bfc678796b519931:quantity=">
<input name="m07qty" type="text" />
<input type="submit" />
</form>

But all it's doing is going to the address in the "action" area. I need it to take the inputted number from the m07qty text box and add it to the address in "action".

Any ideas?

Scott.
tuestunim is offline
Reply With Quote
View Public Profile Visit tuestunim's homepage!
 
Old 04-10-2008, 06:38 PM Re: Putting something from a form on the end of a link
Gilligan's Avatar
Website Designer

Posts: 1,670
Name: Stefan
Location: London, UK
Trades: 0
try this? I might not have understood though.

Code:
<form method="post" action="http://www...com/basket.html">
<input type="hidden" name="screen" value="basket">
<input type="hidden" name="action" value="update">
<input type="hidden" name="basket" value="559 e250cb34d33c4bfc678796b519931">
<input type="hidden" name="quantity" value="">   
<input name="m07qty" type="text" />
  <input type="submit" />
</form>
if thats not what u mean, maybe this is.

Code:
<form method="GET" action="http://www...com/basket.html?screen=basket&action=update&basket:559 e250cb34d33c4bfc678796b519931:quantity=">
  <input name="m07qty" type="text" />
  <input type="submit" />
</form>
EDIT: I think its the second one, if you want the m07qty to appear in the URL then use that.
__________________

Please login or register to view this content. Registration is FREE
Gilligan is offline
Reply With Quote
View Public Profile
 
Old 04-11-2008, 04:07 AM Re: Putting something from a form on the end of a link
tuestunim's Avatar
Experienced Talker

Posts: 41
Name: Scott Brown
Location: Huddersfield, UK
Trades: 0
Hi Gilligan, thanks for your help.

Unfortunately for some reason when I submit the form it's omitting everything after the ?. This is happening with both things you suggested.

I'll keep on trying though as I'm sure there's a way of doing it.

Scott.
tuestunim is offline
Reply With Quote
View Public Profile Visit tuestunim's homepage!
 
Old 04-11-2008, 10:18 AM Re: Putting something from a form on the end of a link
Gilligan's Avatar
Website Designer

Posts: 1,670
Name: Stefan
Location: London, UK
Trades: 0
Can you clear this up for me??

You want everything after the ? to be displayed in the URL, including the m07qty?

if so. this should do it

Code:
<form method="get" action="http://www...com/basket.html">
<input type="hidden" name="screen" value="basket">
<input type="hidden" name="action" value="update">
<input type="hidden" name="basket" value="559e250cb34d33c4bfc678796b519931">
<input type="hidden" name="quantity" value="">   
<input name="m07qty" type="text" />
  <input type="submit" />
</form>
__________________

Please login or register to view this content. Registration is FREE
Gilligan is offline
Reply With Quote
View Public Profile
 
Old 04-11-2008, 10:27 AM Re: Putting something from a form on the end of a link
tuestunim's Avatar
Experienced Talker

Posts: 41
Name: Scott Brown
Location: Huddersfield, UK
Trades: 0
The link I want at the end of it all is as follows:

http://www...com/
basket.html?
screen=basket
&action=update
&basket:559e250cb34d33c4bfc678796b519931:quantity= 1

As you can see, there's no ampersand before the quantity so I don't think it's as simple as entering a number into a form. I'm starting to wonder if it can be done at all. I've had another play about with it myself earlier today and didn't get anywhere.

Thanks for persevering though!

Scott.

P.S. At the end of it all I want that long string of characters after 'basket' to be selected with a drop down menu, as they represent individual products (or sizes or products) on the site, but I just can't see this happening!
tuestunim is offline
Reply With Quote
View Public Profile Visit tuestunim's homepage!
 
Old 04-11-2008, 10:45 AM Re: Putting something from a form on the end of a link
Gilligan's Avatar
Website Designer

Posts: 1,670
Name: Stefan
Location: London, UK
Trades: 0
I just read back on your first post and think I understand what you mean now.

In order for it to work there needs to be a & in front of quantity. But we'll just replace ':' with '&' ?

Code:
<form method="get" action="http://www...com/basket.html">
<input type="hidden" name="screen" value="basket">
<input type="hidden" name="action" value="update">
<input type="hidden" name="basket" value="559e250cb34d33c4bfc678796b519931">
<input name="quantity" type="text" />
  <input type="submit" />
</form>
Try that maybe?
__________________

Please login or register to view this content. Registration is FREE
Gilligan is offline
Reply With Quote
View Public Profile
 
Old 04-11-2008, 10:54 AM Re: Putting something from a form on the end of a link
tuestunim's Avatar
Experienced Talker

Posts: 41
Name: Scott Brown
Location: Huddersfield, UK
Trades: 0
It doesn't work that way, unfortunately. As I said in the first post I've not got access to change anything so I can't get around that. It needs to be a :, not a &. The link I was hoping to build through the use of a form has to exactly resemble the link posted in my last message.

The code you've put there I tried earlier on this morning myself. Great minds and all that...!

Thanks a lot for your help but it doesn't look as if I'm gonna get what I need.

Oh well!

Again, thanks for trying both of you. If you come up with any genius ideas I'll be more than happy to hear them

Scott.
tuestunim is offline
Reply With Quote
View Public Profile Visit tuestunim's homepage!
 
Reply     « Reply to Putting something from a form on the end of a link
 

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