Author |
Topic  |
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 11 July 2007 : 21:30:00
|
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 |
 |
|
JJenson
Advanced Member
    
USA
2121 Posts |
Posted - 11 July 2007 : 21:50:52
|
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? |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
JJenson
Advanced Member
    
USA
2121 Posts |
Posted - 11 July 2007 : 21:59:47
|
OK does any code go into the page it is getting reffered from? |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
JJenson
Advanced Member
    
USA
2121 Posts |
Posted - 12 July 2007 : 09:04:28
|
Great will let you know if I run into anything thanks so much Rui |
 |
|
JJenson
Advanced Member
    
USA
2121 Posts |
Posted - 14 August 2007 : 21:16:01
|
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 
|
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 14 August 2007 : 21:30:03
|
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 |
 |
|
JJenson
Advanced Member
    
USA
2121 Posts |
Posted - 14 August 2007 : 21:41:45
|
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? |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
JJenson
Advanced Member
    
USA
2121 Posts |
Posted - 14 August 2007 : 21:49:18
|
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 
|
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 14 August 2007 : 22:01:00
|
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 |
 |
|
JJenson
Advanced Member
    
USA
2121 Posts |
Posted - 14 August 2007 : 22:06:59
|
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. |
 |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 15 August 2007 : 04:27:26
|
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.” |
 |
|
JJenson
Advanced Member
    
USA
2121 Posts |
Posted - 15 August 2007 : 09:06:50
|
OK I think I am starting to understand thanks  |
 |
|
Topic  |
|