Forums
This topic is locked
Passing ID's
Posted 27 Oct 2002 21:34:47
1
has voted
27 Oct 2002 21:34:47 David Jacobs posted:
Hi,I have written a small site for a ticket seller. When using the update and delete record options in the server behaviors, it seems to pass the id number as well so I am left looking at '/view.asp?ID=7', for example, when in the 'after updating/deleting, goto' option in the server options, I have specified 'view.asp' only.
To continue briefly, when the page 'view.asp?ID=7' is displayed and you go to another link 'more details', the page trying to load is '/more.asp?ID=7&ID=6'.
Why does it pass the querystring to every page?
ps...answers in words of one sylabble please, I am a bit of a dope!!
Replies
Replied 28 Oct 2002 03:20:02
28 Oct 2002 03:20:02 Rob replied:
The ID is needed so the Script know what database record to call so it can display it.
So View.asp has code (Im guessing here) That connects to a database and searches for ID something in this case ID= 7. When It finds it. it then displays that record.
When you want to go top more same thing. It needs the Record ID from the DB to know what to Display.
So View.asp has code (Im guessing here) That connects to a database and searches for ID something in this case ID= 7. When It finds it. it then displays that record.
When you want to go top more same thing. It needs the Record ID from the DB to know what to Display.
Replied 28 Oct 2002 17:51:30
28 Oct 2002 17:51:30 David Jacobs replied:
The thing is Nagash, the update and delete records bit in the server behaviours ask which page to goto after deleting or updating. I have said go to view.asp and it goes to this page but appends it with ?ID=7, so the page viewed is ..../view.asp?ID=7. Then when I try to move to another page, it puts this at the end of the url and a 'page not found' error is shown.
How do I stop it passing the ID number back to the view.asp page?
DJ
How do I stop it passing the ID number back to the view.asp page?
DJ
Replied 29 Oct 2002 12:00:59
29 Oct 2002 12:00:59 Julio Taylor replied:
The problem can be one of these:
1) Your page is sending the tags (the bit of the URL after the question mark, e.g. "?ID=7" using a POST or GET form variables and is causing the recordset in the next page to act silly
2) Your page is sending these as session variabloes which are stored in memory and are not visible through your URL.
Now. The only way these items will have an effect on your pages is if you send and recall them, using behaviours such as "Go to Detail Page" and "Go to Ralated Page". So, for example you can make a link (as you know) to point to a detail page such as "view.asp?id=7". If you click on another link, the variables will only be passed if you tell the link to keep the current variables. This can be done by unchecking the boxes in the "Detail" or "Related" behaviours in UD4.
What kind of link are you using to go to the other page? If you're using a form (such as update/delete) the form will pass the variables in the form (anything contained within that form, such as text boxes etc) through the URL either in POST or GET mode.
The best solution if that's what it's doing is to create a "done" or "saved" page that you can go to after the edit/delete functions. You can use this to "kill" the variable process and go to another page from there without having to worry about the form variables that the page has carried with it from the previous page.
I hope this helps, let us know if we can help more.
------------------------
Julio
PHP | MySQL | UD4
ICQ: 19735247
1) Your page is sending the tags (the bit of the URL after the question mark, e.g. "?ID=7" using a POST or GET form variables and is causing the recordset in the next page to act silly
2) Your page is sending these as session variabloes which are stored in memory and are not visible through your URL.
Now. The only way these items will have an effect on your pages is if you send and recall them, using behaviours such as "Go to Detail Page" and "Go to Ralated Page". So, for example you can make a link (as you know) to point to a detail page such as "view.asp?id=7". If you click on another link, the variables will only be passed if you tell the link to keep the current variables. This can be done by unchecking the boxes in the "Detail" or "Related" behaviours in UD4.
What kind of link are you using to go to the other page? If you're using a form (such as update/delete) the form will pass the variables in the form (anything contained within that form, such as text boxes etc) through the URL either in POST or GET mode.
The best solution if that's what it's doing is to create a "done" or "saved" page that you can go to after the edit/delete functions. You can use this to "kill" the variable process and go to another page from there without having to worry about the form variables that the page has carried with it from the previous page.
I hope this helps, let us know if we can help more.
------------------------
Julio
PHP | MySQL | UD4
ICQ: 19735247
Replied 02 Nov 2002 10:14:26
02 Nov 2002 10:14:26 David Jacobs replied:
Julio,
That males total sense, thank you.
I have used an 'uppdating page, please wait....' and it works perfectly!
Thanks very much..
DJ
That males total sense, thank you.
I have used an 'uppdating page, please wait....' and it works perfectly!
Thanks very much..
DJ
Replied 02 Nov 2002 13:31:03
02 Nov 2002 13:31:03 Julio Taylor replied:
no problem <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
------------------------
Julio
PHP | MySQL | UD4
ICQ: 19735247
------------------------
Julio
PHP | MySQL | UD4
ICQ: 19735247