[Pro] New Window

I am trying to create a new small window pop up, so a client can click on a check availability button, and a new small window will open that will have the name of the item that button relates to (i.e what it is that is available), then an e-mail text field, name text field, date boxes with the calendar action, so that they can select from date and date to., then press send to e-mail to our staff, who will reply

We will have around 150 items, so each box heading will be as per the item it relates to, I do not really want to produce 150 extra pages.

Question is, which action or way should I look to do this


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

This could be coded in JavaScript directly, no need for duplicate pages. If you have all of your different locations identified somehow, you could create a single instance of the popup on the page, with the date pickers and whatnot, and then by coding each link differently (to include the key to that identifying structure) you could pop up that single template with the unique information populated into it.

To start, put together a plain text document containing all of the variations on each of your 150 items. Put a unique key on each line, and follow with the variations, sort of like this:

1: {name: 'Foo', price: 100, delivery_time: '2 weeks'},
2: {name: 'Bar', price: 120, delivery_time: '1 day'}

Things to note here: I am using a format called JSON (JavaScript Object Notation), and it has some rules you need to follow. The part outside of the curly braces is called the key, and they must be unique. Each line except the last must be followed with a comma. The part inside the curly braces is a set of tuples (key/value pairs). Depending on the type of value you are storing, you either need to quote the value (strings of characters – text) or not (numbers or boolean values like true and false). The keys must be a single word or number (well, they can have spaces, but then you also have to quote them).

You may find that once you go through this process for a couple of products, you can automate the process with a good text editor, doing find and replace. I recommend TextWrangler (the free little brother to BBEdit) from BareBones Software for this and any other code work.

Once you have your data structure figured out, use Gist or Pastie to post it here, and I can advise you on the other parts. This is a very approachable problem, very well suited to teaching you how to fish…

Walter

  1. https://gist.github.com
  2. http://pastie.org

On Feb 11, 2013, at 8:49 AM, David Wise wrote:

I am trying to create a new small window pop up, so a client can click on a check availability button, and a new small window will open that will have the name of the item that button relates to (i.e what it is that is available), then an e-mail text field, name text field, date boxes with the calendar action, so that they can select from date and date to., then press send to e-mail to our staff, who will reply

We will have around 150 items, so each box heading will be as per the item it relates to, I do not really want to produce 150 extra pages.

Question is, which action or way should I look to do this


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks Walter, we do not need the pop up to display a price or availability, its just a communication by e-mail from web user to our staff who will return an email confirming price and availability, ( shortcut rather than them filling out a contact page)

Will the text be as per you last thread, just the numbering and the name required in the format you describe

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

If all you are passing is a single name value, you could encode that as a simple key-value pair in a querystring, no need for such a large data structure. Imagine if you used the External tab of the Hyperlink dialog to enter a link to your popup:

URL: #?name=Name%20One
Target: popup

Note that I used a %20 escape sequencer to separate the two words of Name One (no spaces in a URL – ever).

Then you could create a script once on the page that would look for any click on a link that had a target attribute and shift that off to create your popup window. You’d still need to create your links one at a time, but you wouldn’t need to make a separate daughter page for each one, as long as the “Name One” attribute was all you needed to use in your mail.

I wouldn’t actually create a popup window as a separate window, but rather a new page element that would appear within the current page (this will work equally well on an iPad or iPhone as well as a traditional desktop browser).

To get started down this path, make a new HTML element containing the form fields and behavior you want your visitors to see. You can start this out on another page if it helps keep things clear in your head. In the form setup dialog, add a hidden field for the name variable (or whatever you want to call it) that would be sent in the e-mail. Add visible form inputs for the start and end dates. Get this form working from the standpoint of actually returning a mail message (albeit with a missing name attribute, since you haven’t filled that variable with anything yet) when you click the submit button. You’ll need to use the PHP Feedback Form Action or similar to “wire” the form to send mail, and be sure to follow the Action directions when naming your form fields – that will be the difference between that form working and not.

Then back on your original page, set up the links as noted above. Post a link to both pages, so I can see the generated code, and I can take you forward the next step.

Walter

On Feb 11, 2013, at 12:19 PM, David Wise wrote:

Thanks Walter, we do not need the pop up to display a price or availability, its just a communication by e-mail from web user to our staff who will return an email confirming price and availability, ( shortcut rather than them filling out a contact page)

Will the text be as per you last thread, just the numbering and the name required in the format you describe

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Walter, I will try as you describe, and will post the links after, did you do an action so that rather than having text before the field saying name or e-mail, you could actually write it in the field, then when the user writes there name/email it overwrites

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Tim Plumb has written the PHP Feedback Form Action, and Softpress includes a similar Action called Send Form in Freeway 6. Both use generic PHP form processors to handle any form that you point at them. I would not recommend using the really old technique of creating a link that pre-populates an e-mail message – that way lies madness, or at least spam – so experiment with either of those Actions as befits your current Freeway version.

Walter

On Feb 11, 2013, at 2:48 PM, David Wise wrote:

did you do an action so that rather than having text before the field saying name or e-mail, you could actually write it in the field, then when the user writes there name/email it overwrites


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options