Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Asp question
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Asp question

 Post Reply Post Reply Page  12>
Author
rleffew View Drop Down
Newbie
Newbie


Joined: 28 January 2005
Location: United States
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote rleffew Quote  Post ReplyReply Direct Link To This Post Topic: Asp question
    Posted: 28 January 2005 at 9:12am
I am new with ASP (mostly do Visual Basic programming).

I am loading a database onto a screen on website.  Simply list the items from the database onto the screen with a button next to each item.  This button is used to take the person to another screen with more detail of the item they selected.

This is how the button works.

<input type="button" onClick="<%=strButton%>" value="Pull Q">

with strbutton being:

strButton = "parent.location='QuoteDetail.asp?QID=" & getID & "'"

This works fine except now I need for QID to actually be a session because I need to come back to the page and I actually loose QID.

I tried this:

strButton= "parent.location='QuoteDetail.asp?Session("SuplQuoteID")=" & getID & "'"

But I received the following error:

<>Microsoft VBScript compilation error '800a0401'
Expected end of statement
/quotelogscreen.asp, line 67

strButton= "parent.location='QuoteDetail.asp?Session("SuplQuoteID")=" & getID & "'"

Any Suggestion?

Thanks,

Bob
------------------------------------------------------^

 but it did not work, gave me an error said looking for


Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 28 January 2005 at 9:17am
this is wrong

strButton= "parent.location='QuoteDetail.asp?Session("SuplQuoteID")=" & getID & "'"


you need to use " & Session("SuplQuoteID") &"=" & getID & "
if you are not setting it in a veriable ie strButton = 

thats into a veriable

but if you wanted to show the value use <%=getID %>
Back to Top
rleffew View Drop Down
Newbie
Newbie


Joined: 28 January 2005
Location: United States
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote rleffew Quote  Post ReplyReply Direct Link To This Post Posted: 28 January 2005 at 10:20am
I am confused on what you meant about the variable.

I think I what you said.  I changed my command to the following and received this message:

Microsoft VBScript compilation error '800a0401'

Expected end of statement

/quotelogscreen.asp, line 67

strButton= "parent.location='QuoteDetail.asp?& Session("SuplQuoteID") &"=" & getID & "

Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 28 January 2005 at 11:02am
it needs to be


strButton= "parent.location='QuoteDetail.asp?" & Session("SuplQuoteID") &"=" & getID & "'"
red section has to be there
Back to Top
rleffew View Drop Down
Newbie
Newbie


Joined: 28 January 2005
Location: United States
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote rleffew Quote  Post ReplyReply Direct Link To This Post Posted: 28 January 2005 at 11:08am
The syntax was correct this time.  Problem was the page going to did not recognize the session variable.

This is page i am working on

http://www.cejco.net/quotelogscreen.asp
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 28 January 2005 at 11:26am
what is te session ment to hold is it working ok now?
Back to Top
rleffew View Drop Down
Newbie
Newbie


Joined: 28 January 2005
Location: United States
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote rleffew Quote  Post ReplyReply Direct Link To This Post Posted: 28 January 2005 at 11:43am
The page is www.cejco.net/quotelogscreen.asp if you want to look at it and click on one of the buttons to the left of the screen.

I hope I can explain what I am trying to do better. Here goes.

I have an array of data that I list on a page.
This data comes from a ADO Access database.

This data is listed on the page with a button next to each item.

I simply want to click on lets say the 5th item listed on the screen.  This has a separate Supplier Quote ID that distringuishes it from the other items on the list.

I want to go to another page and list out more detail of that quote.

So depending on what button is clicked I need to capture in a session
variable Session("SuplQuoteID")  the Supplier Quote ID for that line item and go to QuoteDetail.asp which obviously will use the session variable to populate the page.

Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 28 January 2005 at 1:27pm
now i under stand ... to set a session you don't set it like the above.. (tell me if im wrong about what im suggesting)

to set a session veriable you use

session("sessionname") = value

the above that you have done is incorrect. i tink you want to send the Quote ID through the querystring

to do so

change the section for the url to the below.


strButton= "parent.location='QuoteDetail.asp?QuoteID=" & getID & "'"

then on rgw quotedetail.asp page

bring in the Quote ID like the below

strQuoteID = Request.querystring("QuoteID")

now when you query the database use the value strQuoteID .


Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.