RE: URL too Long?

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 13106
interpreted = N
texte = Tim ->Is ther a charater limit for the amount of info. you can pass through a url >statement? >Is it an html limit, or a WebCat acgi limit? >All I want to do is pass the title of a product through to the >fullfilment.txt file and the ViewOrder.tmpl file. >This code will work as a form: [...] >This code will not work, but I want it to work. Why is this? What I mean by >not working is that it will cut off part of the title information. Example : >title=The Big Red Wagon, will be placed into the shoppingcart file as >The. >href=ShoppingCart.tmpl$add?db=arkin.txt&cart=[cart]&sku=[sku]&textA=[title]> >Add to CartThis is a common problem with URLs - you can't have spaces in a URL, as nearly all browsers will just cut off the URL at the first space. The fix is very simple - just use a [url] context around whatever is giving you a problem (like...&sku=[sku]&textA=[url][title][/url]...), which will encode all special characters (' ' becomes '%20'), allowing them to be sent in a URL with no problems. Special characters in your form will be automatically encoded by the browser, which is why it was working when the hyperlink was not.I hope this helps,Marc Eagle StarNine Technologies http://www.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. RE: URL too Long? (Marc Eagle 1997)
Tim ->Is ther a charater limit for the amount of info. you can pass through a url >statement? >Is it an html limit, or a WebCat acgi limit? >All I want to do is pass the title of a product through to the >fullfilment.txt file and the ViewOrder.tmpl file. >This code will work as a form: [...] >This code will not work, but I want it to work. Why is this? What I mean by >not working is that it will cut off part of the title information. Example : >title=The Big Red Wagon, will be placed into the shoppingcart file as >The. >href=ShoppingCart.tmpl$add?db=arkin.txt&cart=[cart]&sku=[sku]&textA=[title]> >Add to CartThis is a common problem with URLs - you can't have spaces in a URL, as nearly all browsers will just cut off the URL at the first space. The fix is very simple - just use a [url] context around whatever is giving you a problem (like...&sku=[sku]&textA=[url][title][/url]...), which will encode all special characters (' ' becomes '%20'), allowing them to be sent in a URL with no problems. Special characters in your form will be automatically encoded by the browser, which is why it was working when the hyperlink was not.I hope this helps,Marc Eagle StarNine Technologies http://www.smithmicro.com/ Marc Eagle

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Next X hits (1996) Great product and great job ! (1997) Emailer and encryption (1997) FEA REQ: One .hdr, multiple .db's (2003) [WebDNA] Friendly urls and multipart/form-data (2011) Authenticate (1997) Delete Context - to remove record (1998) Summing fields (1997) WebDNA Programmer addendum (2004) [WebDNA] Mass email using WebDNA (2008) email messages (1997) Signal Raised (1997) showcart (2000) Re2: frames & carts (1997) Accentuated and non-English letters (2002) multiple search commands (1997) Re1000001: Setting up shop (1997) read and write you own cookies with webcat (1997) Sorting by date (1997) Email Formatting (1998)