Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 100 pages 1 Contact Form?
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 3

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 11 July 2007 :  21:30:00  Show Profile  Send ruirib a Yahoo! Message
quote:
Originally posted by AnonJr

I'll ditto the preference comment. I'm just inherently lazy efficient, and since the ID was already in the URL why add it to the form?


Well because the page that will process the form likely won't be the page with the form, wo you will need to pass the ID along, so you will need to add the ID to querystring of the URL in the action tag for the form or do what I did...

You will need to use the form in both cases, so...


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 11 July 2007 :  21:50:52  Show Profile  Visit JJenson's Homepage
Yeah I will have another page that is proccessing the form. Now the first part of your code rui goes on the page referring frmo correct and 2nd code goes in the form?
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 11 July 2007 :  21:55:46  Show Profile  Send ruirib a Yahoo! Message
No Jeff, the code I posted all goes in the page that displays the form.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 11 July 2007 :  21:59:47  Show Profile  Visit JJenson's Homepage
OK does any code go into the page it is getting reffered from?
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 12 July 2007 :  03:46:44  Show Profile  Send ruirib a Yahoo! Message
In that page you just need to retrieve the ID value:

strID = CLng(Request.Form("ID"))

Like this it's already sanitized and you can use the value without any fear.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 12 July 2007 :  09:04:28  Show Profile  Visit JJenson's Homepage
Great will let you know if I run into anything thanks so much Rui
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 14 August 2007 :  21:16:01  Show Profile  Visit JJenson's Homepage
Quick question on this I finally got some access to see what is going on now.

Basically they have 100 domains names something to the effect of

www.somesite1042.com
www.somesite845.com
www.somesite3568.com
www.somesite2121.com

each of these will then need to pass a value to a different domain something like this:

www.thisissomsite.com/contac-us.html

Now Could I just put in the header of each of those pages the store number something like you have the code above rui?

strID = CLng(Request.Form("1042")

then call it on the form page to have it insert into a field that cannot be edited? using something like this?

<%
strID = Request.QueryString("ID")
%>

<form name="demoForm" action="formProcess.asp" method="post">
<input type="hidden" name="ID" value="<%=strID%>">
...
</form>

Just wondering using that code you provided if this will work crossdomains?

THanks

Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 14 August 2007 :  21:30:03  Show Profile  Send ruirib a Yahoo! Message
Form posting AFAIK, does work across domains, as long as the action tag has the absolute URL that will "know" how to process the form.
I'm not sure what you meant about adding the store number to the header of the page. What do you mean by this?


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 14 August 2007 :  21:41:45  Show Profile  Visit JJenson's Homepage
basically the code I posted above that would go into the <head></head> section.

So basically the rest of the code I proposed above would in theory work or working as you say across domains do I need to add some code to make it process correctly?
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 14 August 2007 :  21:45:30  Show Profile  Send ruirib a Yahoo! Message
Why the head section? The head section is not meant for that purpose...How will you submit the form from the head section?


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 14 August 2007 :  21:49:18  Show Profile  Visit JJenson's Homepage
Sorry I think I explained this incorrectly. Basically the code that goes in the page www.somesite1042.com to get the store number in the form is what I meant this code you told me to put on that page:

strID = CLng(Request.Form("1042")

Or I guess since I am not explaining this very well where or how would I use this code I know the orginal you posted was

strID = CLng(Request.Form("ID")

THis is the only code I am trying to figure out how to use.

Sorry Rui it made sense to me
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 14 August 2007 :  22:01:00  Show Profile  Send ruirib a Yahoo! Message
Let's start this anew:


1. The page that processes the form, which I think will be www.thisissomsite.com/contac-us.html (can't be an html page, needs to be .asp, in your case), is the one that needs to read whatever comes from the form, so it will need a statement like:

strID = CLng(Request.Form("ID")

2. The calling page must provide the form, to be submitted by the user, or automatically by the page.


If you don't want to use a form, the referringpage can use something like this to link to the contacts page:

<a href="www.thisissomsite.com/contac-us.asp?ref=1042">Contact Us</a>

Then contac-us.asp just needs to do something like:

ID = Clng(Request.QuerySring("ID))

Does this make sense now?


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 14 August 2007 :  22:06:59  Show Profile  Visit JJenson's Homepage
Ok yeah I like the anew idea. Cause I think I am getting lost. Tell me if we are on the same page or If I am missing the ball completely on this one.

Ok I have a page that is something like www.somesite1042.com they click a link on this page that takes them to www.thisissomesite.com/contact-us.asp on this page there will be a form with some fields.

name (field)
email (field)
phone number (field)
store number (this is where I need the store number entered without it being editable)
comments (field)

Then this is where they click submit and it sends an email to a set email with all the info on it.

Does this make sense cause I think I am either misunderstanding you to me it sounds backwards to me but just need to make sure I am not missing something here.
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 15 August 2007 :  04:27:26  Show Profile
In the link that takes you from somesite1042.com to the contact page, you will need to include a querystring that holds that 1042 number, which you can determine using any manner of string manipulation you like (e.g., contact-us.asp?store=1042). Then, on contact.asp, use request.querystring to grab the store ID and sanitise and use it as you wish.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 15 August 2007 :  09:06:50  Show Profile  Visit JJenson's Homepage
OK I think I am starting to understand thanks
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.22 seconds. Powered By: Snitz Forums 2000 Version 3.4.07