Can The Page Name or Full URL Be...

User 38401 Photo


Senior Advisor
10,951 posts

Hiya Neal,

There are 2 major things I would suggest for your pages, specifically for your page or file names. Do NOT use spaces or Capital Letters. Spaces give the %20 that you see in your file name link above which can cause issues with people trying to find your pages. To fix that use an underscore line _ or a dash - in place of your spaces.

so 1001 Test Property becomes 1001_test_property (removed the caps also)

Capital letters cause even more major issues as most servers treat small and caps as totally different entities hence:

Test_Property "does not equal" test_property

This can be a real major issue when people are looking for your pages as most people do not use caps when typing web addresses and they would have no intuitive way to know you used them or where. Same with the spaces, most people don't type spaces in a file name in a URL so they'd have no way to know if you did or not and some servers will not read it correctly.

Hope that helps a little, unfortunately I'm sure it doesn't help your issue.
User 1020248 Photo


Registered User
30 posts

Hi Neal,

Looks like the problem is simply that your form is inside a frame. Just change the first line in the script that retrieves data from the browser URL
from:
var query = window.location.search;

to:
var query = parent.location.search;

All of the rest of the coding for this looks fine.

I've also added a couple links to your site on the sample page: http://puzzlespaces.coffeecup.com/Accof … erral.html

Let me know how it goes....

Richard
To borrow from the sentiment of Nathan Hale:
"I regret that I have but one form to give for my forum"
(perhaps I'll find an S-drive Webbie egg in an Easter egg hunt)

http://www.shoponlinebycountry.com
(Built with HTML Editor 12.6, Web Image Studio)

http://anitacards.coffeecup.com
(Built with HTML Editor 12.6, Web Image Studio, Web Form Builder)
User 1020248 Photo


Registered User
30 posts

Hey there Jo Ann,

You are quite right about good practice for naming a URL address, however that does Not apply to the data contained after the "?". Anything after it is merely a query string and the browser doesn't care if you use spaces or caps.
Even if a user manually typed the information after the ? incorrectly, it would simply use that data wherever the query string was being used. ( for example "testproperty" instead of "Test_Property". There are more complicated scripts that could even fix this, but in Neal's case it wouldn't likely matter, since they are getting to the page through a link, and the query would usually even stay in a bookmark.

CoffeeCup uses a similar technique all the time (just keep an eye on your address bar) ;)

Richard
To borrow from the sentiment of Nathan Hale:
"I regret that I have but one form to give for my forum"
(perhaps I'll find an S-drive Webbie egg in an Easter egg hunt)

http://www.shoponlinebycountry.com
(Built with HTML Editor 12.6, Web Image Studio)

http://anitacards.coffeecup.com
(Built with HTML Editor 12.6, Web Image Studio, Web Form Builder)
User 2159003 Photo


Registered User
9 posts

Hi Richard

Thanks, it's almost working now! It now writes the property reference into the ref field on the form fine. However, when I submit the form it disappears and is not on the email. Might it be because the field is set to read only on the form, or is there something else a bit wrong?

Regards, Neal
User 1020248 Photo


Registered User
30 posts

Hi Neal,

I just checked the source code and it says "disabled" in that field. Have you changed it from "read only"?

Richard
To borrow from the sentiment of Nathan Hale:
"I regret that I have but one form to give for my forum"
(perhaps I'll find an S-drive Webbie egg in an Easter egg hunt)

http://www.shoponlinebycountry.com
(Built with HTML Editor 12.6, Web Image Studio)

http://anitacards.coffeecup.com
(Built with HTML Editor 12.6, Web Image Studio, Web Form Builder)
User 2159003 Photo


Registered User
9 posts

Hi Richard

I don't think so, but you never know. I went back into the form to tweak it a little, pasted the code back into the html file, uploaded it all again, and now it is working perfectly. Thank you so much for your help, I would never have been able to do this by myself. I can now get busy building all the property pages as I now have a beautifully working form!

Many thanks again, regards, Neal
User 1020248 Photo


Registered User
30 posts

Hi Neal,

That's great! :) I've learned a lot from other members here on the forum, and it's nice to be able to give a little back. By the way, that website is shaping up beautifully. You've got a great eye for design. Your client should be thrilled.

Richard

To borrow from the sentiment of Nathan Hale:
"I regret that I have but one form to give for my forum"
(perhaps I'll find an S-drive Webbie egg in an Easter egg hunt)

http://www.shoponlinebycountry.com
(Built with HTML Editor 12.6, Web Image Studio)

http://anitacards.coffeecup.com
(Built with HTML Editor 12.6, Web Image Studio, Web Form Builder)
User 1020248 Photo


Registered User
30 posts

Hi all,

For those of you who would just like to retrieve the URL information to your form, first copy this small Javascript into the Head section of your form:

<script type="text/javascript">
var query1 = parent.location.pathname;
var urlname = query1;
</script>

Then place this code anywhere in the text area of your form if you want it to show on the body of the form:

<script>
{document.write(" Ref. URL: " + urlname);}
</script>

Example here, (at the very bottom of the form): http://puzzlespaces.coffeecup.com/Accof … oform.html

If you would like to insert this information into one of your form fields (to appear in your email, etc.) place this script somewhere on the form AFTER the the input field ( near the end of the body is fine). Substitute your own field Id ( in this case 'item7_text_1' )

<script>
document.getElementById('item7_text_1').value = urlname;
</script>

Example in "Last Name" field (running out of room to put stuff in this form :/):

Hope this will be useful to some of you.

Richard
To borrow from the sentiment of Nathan Hale:
"I regret that I have but one form to give for my forum"
(perhaps I'll find an S-drive Webbie egg in an Easter egg hunt)

http://www.shoponlinebycountry.com
(Built with HTML Editor 12.6, Web Image Studio)

http://anitacards.coffeecup.com
(Built with HTML Editor 12.6, Web Image Studio, Web Form Builder)
User 187934 Photo


Senior Advisor
20,197 posts

Here's another version of capturing the form url.
http://www.coffeecup.com/forums/web-for … post212728
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.