Javascript query string fed contact form page

Whoever can figure this out will be a true guru !! I am willing to pay $60 prize money for a successful solution to this…

I have a page with a contact form (originally built in freeway) that a web developer has modified the code (with an added javascript file) to do a few things: - feed info via a query string into one of the text fields of the form. - substitute different text and images depending on which query string is used.

It may be easier if I show you:

—the Developer modified page (that works but has to edited by coding)

—And the Freeway built page (that needs fixing so that it works with the query links)

They can both be accessed by this page below: Once on the page, click on links on the left (below “Strings to Developer built page”) to see how the query string works. The links on the right point to the FW version and are currently not bringing up the dynamic info. http://www.measurlogic.com/Info/querylinkspage.html

In order to tackle this you may want to:

  1. view source on the two contact pages to see why the developer modified one works and the FW built one doesn’t.

http://www.measurlogic.com/contactus.html
http://www.measurlogic.com/contactusFW.html

  1. find a way to get the FW version to successfully reference the javascript file “contactus.js” and update the images and graphics. You will see I have inserted HTML markup into the FW file wherever there is variable elements (images and text).

Here is a link to the pertinent Freeway and javascript files all zipped up:

I have spent many hours trying to get this figured out but to no avail. Thanks in advance for your help on this. Maybe the solution will also provide the seeds for a great action or extra FW versatility.

All the best, Steve


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

If both versions are referencing the same contactus.js file, then I can’t see any significant differences between these that could be causing this problem. The differences I saw between the pages were mostly to do with styles.

The only possible issue might be timing – if the bannerimage element hasn’t been downloaded by the browser when the script runs, it might not get replaced. In your page, the reference to contactus.js happens at the top of the HEAD, and in theirs, it happens near the bottom of the HEAD. You might try switching that in Freeway from After HEAD to Before /HEAD in the Page / HTML Markup dialog.

Walter


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

Could this not be simplified by having 2 different forms for the tour and the demo each leading to its own specific thanks page.

Or am I missing something?

David


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

Hi Walter,

Thanks for your insight but I had actually tried previously to place the reference to the contactus.js Before /HEAD and every other slot available in the Page / HTML Markup dialog.

I just tested your recommendation again just to double check and even tried to use the Insert / Markup item in FW and moved it to the upper left and then lower right part of the page. None of this worked. So, it seems that is not the issue unless you have other ideas.

Could there be a conflict somewhere else? I have scanned the FW page and deactivated every other non-related actions and that did not help.

Look forward to hearing your thoughts.
All the best,
Steve

On 10 Sep 2010, 8:33 pm, waltd wrote:

If both versions are referencing the same contactus.js file, then I can’t see any significant differences between these that could be causing this problem. The differences I saw between the pages were mostly to do with styles.

The only possible issue might be timing – if the bannerimage element hasn’t been downloaded by the browser when the script runs, it might not get replaced. In your page, the reference to contactus.js happens at the top of the HEAD, and in theirs, it happens near the bottom of the HEAD. You might try switching that in Freeway from After HEAD to Before /HEAD in the Page / HTML Markup dialog.

Walter


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

Hi Dave,

We have many query strings and would then need many contact forms. Running everything through the same form streamlines this.

We also have a energy calculator that submits it data findings to the contact form through a query string. (which is why this system was built in the first place)

http://www.measurlogic.com/VoltageSagSupport/dpiselector.html

Believe me, I liked your idea at the start of all this – but now am locked into getting this right as there is no turning back.

Thanks for your interest,

Steve

On 10 Sep 2010, 10:04 pm, DeltaDave wrote:

Could this not be simplified by having 2 different forms for the tour and the demo each leading to its own specific thanks page.

Or am I missing something?

David


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

If there is, the JavaScript console in Safari isn’t pointing it out.
The contactus.js is well written – it covers all errors with defaults
– so I don’t get to see what the underlying issue is.

If it were my code to fool with, I would go through the logical flow
of the script (in a text editor) and insert alert statements at each
branch of the code to see what is actually being passed in at each
point.

Walter

On Sep 11, 2010, at 2:01 AM, redpoint wrote:

Could there be a conflict somewhere else? I have scanned the FW
page and deactivated every other non-related actions and that did
not help.

Look forward to hearing your thoughts.


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

Hi Walt,
I have directed the contactusFW.html page to reference “contactusAlert.js” (a duplicate version with alerts inserted)

The error I am getting now is:
Error: missing ) after argument list

It seems to make it to the first alert (JS loaded); but no further. Any ideas?

Thanks,
Steve

On 11 Sep 2010, 3:18 pm, waltd wrote:

If there is, the JavaScript console in Safari isn’t pointing it out.
The contactus.js is well written – it covers all errors with defaults
– so I don’t get to see what the underlying issue is.

If it were my code to fool with, I would go through the logical flow
of the script (in a text editor) and insert alert statements at each
branch of the code to see what is actually being passed in at each
point.

Walter


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

This page on your public server:

http://www.measurlogic.com/contactusFW.html?PowerStudio%20Guided%20Tour%20Access

is pointing to the other version. Have you uploaded your modified
version?

You’re describing a syntax error in a function declaration. If you
wanted a very simple example of that error, it would look like this:

 //this passes ok
 function foo(arg1,arg2,arg3){
     //do something here
 }

 //this would throw the error you describe
 function bar(arg1,arg2,arg3{ //note the missing close parenthesis
     //do something here
 }

The error doesn’t have to be exactly there, if there are an unbalanced
number of open and close parentheses, that could end up making your
browser think that the error is in that spot, even if it began earlier
in the code. Safari is usually very good about figuring out where the
problem is, does it show you a line number?

Walter

On Sep 13, 2010, at 12:55 PM, redpoint wrote:

Hi Walt,
I have directed the contactusFW.html page to reference
“contactusAlert.js” (a duplicate version with alerts inserted)

The error I am getting now is:
Error: missing ) after argument list

It seems to make it to the first alert (JS loaded); but no further.
Any ideas?

Thanks,
Steve

On 11 Sep 2010, 3:18 pm, waltd wrote:

If there is, the JavaScript console in Safari isn’t pointing it out.
The contactus.js is well written – it covers all errors with
defaults
– so I don’t get to see what the underlying issue is.

If it were my code to fool with, I would go through the logical flow
of the script (in a text editor) and insert alert statements at each
branch of the code to see what is actually being passed in at each
point.

Walter


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