not getting a page

This is a discussion on "not getting a page" within the Classic ASP section. This forum, and the thread "not getting a page are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 15th, 2003, 20:47
Reputable Member
Join Date: Sep 2003
Location: USA
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
not getting a page

I have a form, and the submit line is created on the fly, like this:
Code: Select all
  	if isbn="" then 
		nextPage = "Process.asp"
		buttonString =  "<INPUT disabled TYPE='submit' NAME='reviewSubmit' VALUE='Submit'>"
		PageTitle = "Children's Literature Review Entry"
	else
		' check to see if they are authorized to edit this review
		
		if (myStatus="Student" and getFieldData("StKatesApproved", 0) = True) OR _
			((myStatus<>"Second Editor" and myStatus <> "Staff")  and  getFieldData("FirstEditComplete", 0) = True) OR _
			(  myStatus <> "Staff" and getFieldData("SecondEditComplete", 0) = True) then 
				response.cookies("ChildLit")("message") = "This book has already been edited. You cannot make further changes to this review."
				response.redirect "DisplayBook.asp?isbn=" & isbn & "&reviewer=" & user
		else
			nextPage = "Update.asp"
			SELECT CASE getArrayData("ReferPage")
			case "ReviewReview", "Process"
				 buttonString =  "<INPUT TYPE='submit' NAME='reviewSubmit' VALUE='Update'>"
				PageTitle = "Children's Literature Review Update"
			case "ReviewAll", "Update", "DuplicateISBN"
				 buttonString =  "<INPUT TYPE='submit' NAME='reviewSubmit' VALUE='Approve Edits'>"
				PageTitle = "Children's Literature Review Edit"
			end SELECT 
		end if
	end if


<FORM NAME="ReviewForm" METHOD="post" ACTION="<% response.write nextPage %>" >
It works when I'm in nextpage = Process.asp
but it doesn't always work when I'm going to update.asp

When I'm in "case "ReviewReview", "Process"" the form line on the page says:
<form name="ReviewForm" method="post" action="Update.asp">
but when I submit the form I get /.asp as the next page. (and obviously I get an error)

When I'm in the other case it's just fine.

I don't get it!

any hints?

Thanks
jakyra

  #2 (permalink)  
Old Sep 15th, 2003, 22:42
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
So you're saying the form tag looks right when you look at the page source, but it's not posting to where the ACTION says?
  #3 (permalink)  
Old Sep 16th, 2003, 11:14
Junior Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
The ASP code is at the moment irrelevant. Post the full HTML source of the result and from there we're more likely to spot the problem. Probably something like overlapping forms, submit button outside the form tags etc.
  #4 (permalink)  
Old Sep 16th, 2003, 13:17
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
I think I've worked out what this code is doing :razz:.
What happens if you move the nextPage = "Update.asp" line to the bottom of that section of code like:

...
Code: Select all
SELECT CASE getArrayData("ReferPage")
  case "ReviewReview", "Process"
    buttonString =  "<INPUT TYPE='submit' NAME='reviewSubmit' VALUE='Update'>"
    PageTitle = "Children's Literature Review Update"
  case "ReviewAll", "Update", "DuplicateISBN"
    buttonString =  "<INPUT TYPE='submit' NAME='reviewSubmit' VALUE='Approve Edits'>"
    PageTitle = "Children's Literature Review Edit"
end SELECT
<font color="green">nextPage = "Update.asp"</font id="green">
...
  #5 (permalink)  
Old Sep 16th, 2003, 18:41
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
I'm with Nick. I think the problem isn't with the asp code, but maybe two forms on the page or something HTML related.
  #6 (permalink)  
Old Sep 16th, 2003, 19:40
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
Yeah... I think maybe two forms on the same page conflicting... give them seperate names.

This looks the most likely cause.
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
  #7 (permalink)  
Old Sep 16th, 2003, 20:29
Reputable Member
Join Date: Sep 2003
Location: USA
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
D3mon was correct.
Just moving that line of code helped.

But why??:??:??:??:??:??:

Thanks for everyone's time!
jakyra
  #8 (permalink)  
Old Sep 16th, 2003, 21:10
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
At some point - possibly during the getArrayData function, the value of the variable nextPage gets changed to something completely different, unexpectedly.

Redefining the nextPage variable after the Select Case circumvents the problem, but is an indicator of either bigger problems or the need for better coding practices.
  #9 (permalink)  
Old Sep 16th, 2003, 21:18
Reputable Member
Join Date: Sep 2003
Location: USA
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
I'll look into that.

Thanks!
jakyra
  #10 (permalink)  
Old Sep 16th, 2003, 21:24
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
no problem
  #11 (permalink)  
Old Sep 18th, 2003, 20:35
Reputable Member
Join Date: Sep 2003
Location: USA
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
nevermind - soory
Closed Thread

Tags
getting, page

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Best way to prevent access to page B except via page A? Donny Bahama PHP Forum 1 Apr 3rd, 2008 02:15
Green bar of colour at bottom of page gets bigger the more page is extended pixelgirl Web Page Design 1 Apr 1st, 2008 01:27
internal navigation, Linking from one page to a specific div in another page. Oak Web Page Design 5 Feb 8th, 2008 22:54
Linking an outside page back to previous framed page MJustison Starting Out 1 Oct 18th, 2007 17:49
A gap appears beween the Page Title and the Body Content of the page. sovereign6 Web Page Design 6 Dec 18th, 2006 19:14


All times are GMT. The time now is 06:33.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43